microblaze: Prefer to use pr_XXX instead of printk(KERN_XX)
Fix reset.c, timer.c, setup.c file. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
fcc1c0ff25
commit
aaa5241ebb
|
@ -26,14 +26,14 @@ void of_platform_reset_gpio_probe(void)
|
||||||
"hard-reset-gpios", 0);
|
"hard-reset-gpios", 0);
|
||||||
|
|
||||||
if (!gpio_is_valid(handle)) {
|
if (!gpio_is_valid(handle)) {
|
||||||
printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
|
pr_info("Skipping unavailable RESET gpio %d (%s)\n",
|
||||||
handle, "reset");
|
handle, "reset");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = gpio_request(handle, "reset");
|
ret = gpio_request(handle, "reset");
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk(KERN_INFO "GPIO pin is already allocated\n");
|
pr_info("GPIO pin is already allocated\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ void of_platform_reset_gpio_probe(void)
|
||||||
/* Setup output direction */
|
/* Setup output direction */
|
||||||
gpio_set_value(handle, 0);
|
gpio_set_value(handle, 0);
|
||||||
|
|
||||||
printk(KERN_INFO "RESET: Registered gpio device: %d, current val: %d\n",
|
pr_info("RESET: Registered gpio device: %d, current val: %d\n",
|
||||||
handle, reset_val);
|
handle, reset_val);
|
||||||
return;
|
return;
|
||||||
err:
|
err:
|
||||||
|
@ -76,7 +76,7 @@ void of_platform_reset_gpio_probe(void)
|
||||||
|
|
||||||
void machine_restart(char *cmd)
|
void machine_restart(char *cmd)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "Machine restart...\n");
|
pr_notice("Machine restart...\n");
|
||||||
gpio_system_reset();
|
gpio_system_reset();
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
|
@ -84,21 +84,21 @@ void machine_restart(char *cmd)
|
||||||
|
|
||||||
void machine_shutdown(void)
|
void machine_shutdown(void)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "Machine shutdown...\n");
|
pr_notice("Machine shutdown...\n");
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_halt(void)
|
void machine_halt(void)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "Machine halt...\n");
|
pr_notice("Machine halt...\n");
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_power_off(void)
|
void machine_power_off(void)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "Machine power off...\n");
|
pr_notice("Machine power off...\n");
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ void __init setup_arch(char **cmdline_p)
|
||||||
xilinx_pci_init();
|
xilinx_pci_init();
|
||||||
|
|
||||||
#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)
|
#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)
|
||||||
printk(KERN_NOTICE "Self modified code enable\n");
|
pr_notice("Self modified code enable\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_VT
|
#ifdef CONFIG_VT
|
||||||
|
|
|
@ -116,21 +116,21 @@ static void microblaze_timer_set_mode(enum clock_event_mode mode,
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case CLOCK_EVT_MODE_PERIODIC:
|
case CLOCK_EVT_MODE_PERIODIC:
|
||||||
printk(KERN_INFO "%s: periodic\n", __func__);
|
pr_info("%s: periodic\n", __func__);
|
||||||
microblaze_timer0_start_periodic(freq_div_hz);
|
microblaze_timer0_start_periodic(freq_div_hz);
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_MODE_ONESHOT:
|
case CLOCK_EVT_MODE_ONESHOT:
|
||||||
printk(KERN_INFO "%s: oneshot\n", __func__);
|
pr_info("%s: oneshot\n", __func__);
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_MODE_UNUSED:
|
case CLOCK_EVT_MODE_UNUSED:
|
||||||
printk(KERN_INFO "%s: unused\n", __func__);
|
pr_info("%s: unused\n", __func__);
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_MODE_SHUTDOWN:
|
case CLOCK_EVT_MODE_SHUTDOWN:
|
||||||
printk(KERN_INFO "%s: shutdown\n", __func__);
|
pr_info("%s: shutdown\n", __func__);
|
||||||
microblaze_timer0_stop();
|
microblaze_timer0_stop();
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_MODE_RESUME:
|
case CLOCK_EVT_MODE_RESUME:
|
||||||
printk(KERN_INFO "%s: resume\n", __func__);
|
pr_info("%s: resume\n", __func__);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,14 +274,14 @@ void __init time_init(void)
|
||||||
timer_num = be32_to_cpup(of_get_property(timer,
|
timer_num = be32_to_cpup(of_get_property(timer,
|
||||||
"xlnx,one-timer-only", NULL));
|
"xlnx,one-timer-only", NULL));
|
||||||
if (timer_num) {
|
if (timer_num) {
|
||||||
printk(KERN_EMERG "Please enable two timers in HW\n");
|
pr_emerg("Please enable two timers in HW\n");
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SELFMOD_TIMER
|
#ifdef CONFIG_SELFMOD_TIMER
|
||||||
selfmod_function((int *) arr_func, timer_baseaddr);
|
selfmod_function((int *) arr_func, timer_baseaddr);
|
||||||
#endif
|
#endif
|
||||||
printk(KERN_INFO "%s #0 at 0x%08x, irq=%d\n",
|
pr_info("%s #0 at 0x%08x, irq=%d\n",
|
||||||
timer->name, timer_baseaddr, irq);
|
timer->name, timer_baseaddr, irq);
|
||||||
|
|
||||||
/* If there is clock-frequency property than use it */
|
/* If there is clock-frequency property than use it */
|
||||||
|
|
Loading…
Reference in New Issue