#endif
rk30_init_sdmmc();
#if defined(CONFIG_FIQ_DEBUGGER) && defined(DEBUG_UART_PHYS)
- rk_serial_debug_init(DEBUG_UART_PHYS, IRQ_UART0 + CONFIG_RK_DEBUG_UART, IRQ_UART_SIGNAL, -1);
+ rk_serial_debug_init(DEBUG_UART_BASE, IRQ_UART0 + CONFIG_RK_DEBUG_UART, IRQ_UART_SIGNAL, -1);
#endif
rk30_init_i2s();
return 0;
-/*
- * linux/arch/arm/mach-rk30/include/mach/rk30_fiq_debugger.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
+#ifndef __PLAT_RK_FIQ_DEBUGGER_H
+#define __PLAT_RK_FIQ_DEBUGGER_H
-#ifndef __MACH_RK30_FIQ_DEBUGGER_H
-#define __MACH_RK30_FIQ_DEBUGGER_H
-
-//#ifdef CONFIG_RK30_FIQ_DEBUGGER
#ifdef CONFIG_FIQ_DEBUGGER
-void rk_serial_debug_init(unsigned int base, int irq, int signal, int wakeup_irq);
+void rk_serial_debug_init(void __iomem *base, int irq, int signal_irq, int wakeup_irq);
#else
-static inline void rk_serial_debug_init(unsigned int base, int irq, int signal, int wakeup_irq)
+static inline void rk_serial_debug_init(void __iomem *base, int irq, int signal_irq, int wakeup_irq)
{
}
#endif
/*
- * arch/arm/mach-rk/rk_fiq_debugger.c
+ * arch/arm/plat-rk/rk_fiq_debugger.c
*
* Serial Debugger Interface for Rockchip
*
+ * Copyright (C) 2012 ROCKCHIP, Inc.
* Copyright (C) 2008 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
static int rk_fiq_debugger_id;
-void rk_serial_debug_init(unsigned int base, int irq, int signal, int wakeup_irq)
+void rk_serial_debug_init(void __iomem *base, int irq, int signal_irq, int wakeup_irq)
{
struct rk_fiq_debugger *t = NULL;
struct platform_device *pdev = NULL;
struct resource *res = NULL;
int res_count = 0;
+ if (!base) {
+ pr_err("Invalid fiq debugger uart base\n");
+ return;
+ }
+
t = kzalloc(sizeof(struct rk_fiq_debugger), GFP_KERNEL);
if (!t) {
pr_err("Failed to allocate for fiq debugger\n");
t->pdata.uart_flush = debug_flush;
t->pdata.fiq_enable = fiq_enable;
t->pdata.force_irq = force_irq;
- t->debug_port_base = ioremap(base, PAGE_SIZE);
-
- if (!t->debug_port_base) {
- pr_err("Failed to ioremap for fiq debugger\n");
- goto out1;
- }
+ t->debug_port_base = base;
res = kzalloc(sizeof(struct resource) * 3, GFP_KERNEL);
if (!res) {
goto out3;
};
- if(irq >= 0){
+ if (irq >= 0) {
res[0].flags = IORESOURCE_IRQ;
res[0].start = irq;
res[0].end = irq;
res_count++;
}
- if(signal >= 0){
+ if (signal_irq >= 0) {
res[1].flags = IORESOURCE_IRQ;
- res[1].start = signal;
- res[1].end = signal;
+ res[1].start = signal_irq;
+ res[1].end = signal_irq;
res[1].name = "signal";
res_count++;
}
out3:
kfree(res);
out2:
- iounmap(t->debug_port_base);
-out1:
kfree(t);
}