aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-netx
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/arm/mach-netx
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'arch/arm/mach-netx')
-rw-r--r--arch/arm/mach-netx/Makefile.boot2
-rw-r--r--arch/arm/mach-netx/fb.c36
-rw-r--r--arch/arm/mach-netx/generic.c7
-rw-r--r--arch/arm/mach-netx/generic.h1
-rw-r--r--arch/arm/mach-netx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-netx/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-netx/include/mach/netx-regs.h16
-rw-r--r--arch/arm/mach-netx/nxdb500.c7
-rw-r--r--arch/arm/mach-netx/nxdkn.c7
-rw-r--r--arch/arm/mach-netx/nxeb500hmi.c7
-rw-r--r--arch/arm/mach-netx/xc.c3
11 files changed, 54 insertions, 36 deletions
diff --git a/arch/arm/mach-netx/Makefile.boot b/arch/arm/mach-netx/Makefile.boot
index 534a4d27055..b81cf6aff0a 100644
--- a/arch/arm/mach-netx/Makefile.boot
+++ b/arch/arm/mach-netx/Makefile.boot
@@ -1,2 +1,2 @@
1 zreladdr-y += 0x80008000 1 zreladdr-y := 0x80008000
2 2
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c
index d122ee6ab99..b9913234bbf 100644
--- a/arch/arm/mach-netx/fb.c
+++ b/arch/arm/mach-netx/fb.c
@@ -69,7 +69,41 @@ void netx_clcd_remove(struct clcd_fb *fb)
69 fb->fb.screen_base, fb->fb.fix.smem_start); 69 fb->fb.screen_base, fb->fb.fix.smem_start);
70} 70}
71 71
72static AMBA_AHB_DEVICE(fb, "fb", 0, 0x00104000, { NETX_IRQ_LCD }, NULL); 72void clk_disable(struct clk *clk)
73{
74}
75
76int clk_set_rate(struct clk *clk, unsigned long rate)
77{
78 return 0;
79}
80
81int clk_enable(struct clk *clk)
82{
83 return 0;
84}
85
86struct clk *clk_get(struct device *dev, const char *id)
87{
88 return dev && strcmp(dev_name(dev), "fb") == 0 ? NULL : ERR_PTR(-ENOENT);
89}
90
91void clk_put(struct clk *clk)
92{
93}
94
95static struct amba_device fb_device = {
96 .dev = {
97 .init_name = "fb",
98 .coherent_dma_mask = ~0,
99 },
100 .res = {
101 .start = 0x00104000,
102 .end = 0x00104fff,
103 .flags = IORESOURCE_MEM,
104 },
105 .irq = { NETX_IRQ_LCD, NO_IRQ },
106};
73 107
74int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) 108int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel)
75{ 109{
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index aa627465d91..00023b5cf12 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -168,7 +168,7 @@ void __init netx_init_irq(void)
168{ 168{
169 int irq; 169 int irq;
170 170
171 vic_init(io_p2v(NETX_PA_VIC), 0, ~0, 0); 171 vic_init(__io(io_p2v(NETX_PA_VIC)), 0, ~0, 0);
172 172
173 for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) { 173 for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) {
174 irq_set_chip_and_handler(irq, &netx_hif_chip, 174 irq_set_chip_and_handler(irq, &netx_hif_chip,
@@ -187,8 +187,3 @@ static int __init netx_init(void)
187 187
188subsys_initcall(netx_init); 188subsys_initcall(netx_init);
189 189
190void netx_restart(char mode, const char *cmd)
191{
192 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
193 NETX_SYSTEM_RES_CR);
194}
diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h
index 9b915119b8d..ede2d35341c 100644
--- a/arch/arm/mach-netx/generic.h
+++ b/arch/arm/mach-netx/generic.h
@@ -19,7 +19,6 @@
19 19
20extern void __init netx_map_io(void); 20extern void __init netx_map_io(void);
21extern void __init netx_init_irq(void); 21extern void __init netx_init_irq(void);
22extern void netx_restart(char, const char *);
23 22
24struct sys_timer; 23struct sys_timer;
25extern struct sys_timer netx_timer; 24extern struct sys_timer netx_timer;
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S
index 247781e096e..56a91522818 100644
--- a/arch/arm/mach-netx/include/mach/debug-macro.S
+++ b/arch/arm/mach-netx/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include "hardware.h" 14#include "hardware.h"
15 15
16 .macro addruart, rp, rv, tmp 16 .macro addruart, rp, rv
17 mov \rp, #0x00000a00 17 mov \rp, #0x00000a00
18 orr \rv, \rp, #io_p2v(0x00100000) @ virtual 18 orr \rv, \rp, #io_p2v(0x00100000) @ virtual
19 orr \rp, \rp, #0x00100000 @ physical 19 orr \rp, \rp, #0x00100000 @ physical
diff --git a/arch/arm/mach-netx/include/mach/hardware.h b/arch/arm/mach-netx/include/mach/hardware.h
index b661af2f214..517a2bd3784 100644
--- a/arch/arm/mach-netx/include/mach/hardware.h
+++ b/arch/arm/mach-netx/include/mach/hardware.h
@@ -33,7 +33,7 @@
33#define XMAC_MEM_SIZE 0x1000 33#define XMAC_MEM_SIZE 0x1000
34#define SRAM_MEM_SIZE 0x8000 34#define SRAM_MEM_SIZE 0x8000
35 35
36#define io_p2v(x) IOMEM((x) - NETX_IO_PHYS + NETX_IO_VIRT) 36#define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT)
37#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS) 37#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS)
38 38
39#endif 39#endif
diff --git a/arch/arm/mach-netx/include/mach/netx-regs.h b/arch/arm/mach-netx/include/mach/netx-regs.h
index fdde22b58ac..5a03e7ccb01 100644
--- a/arch/arm/mach-netx/include/mach/netx-regs.h
+++ b/arch/arm/mach-netx/include/mach/netx-regs.h
@@ -115,7 +115,7 @@
115 *********************************/ 115 *********************************/
116 116
117/* Registers */ 117/* Registers */
118#define NETX_SYSTEM_REG(ofs) IOMEM(NETX_VA_SYSTEM + (ofs)) 118#define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs))
119#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00) 119#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00)
120#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04) 120#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04)
121#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08) 121#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08)
@@ -185,7 +185,7 @@
185 *******************************/ 185 *******************************/
186 186
187/* Registers */ 187/* Registers */
188#define NETX_GPIO_REG(ofs) IOMEM(NETX_VA_GPIO + (ofs)) 188#define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs))
189#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2)) 189#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2))
190#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2)) 190#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2))
191#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2)) 191#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2))
@@ -230,7 +230,7 @@
230 *******************************/ 230 *******************************/
231 231
232/* Registers */ 232/* Registers */
233#define NETX_PIO_REG(ofs) IOMEM(NETX_VA_PIO + (ofs)) 233#define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs))
234#define NETX_PIO_INPIO NETX_PIO_REG(0x0) 234#define NETX_PIO_INPIO NETX_PIO_REG(0x0)
235#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4) 235#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4)
236#define NETX_PIO_OEPIO NETX_PIO_REG(0x8) 236#define NETX_PIO_OEPIO NETX_PIO_REG(0x8)
@@ -240,7 +240,7 @@
240 *******************************/ 240 *******************************/
241 241
242/* Registers */ 242/* Registers */
243#define NETX_MIIMU IOMEM(NETX_VA_MIIMU) 243#define NETX_MIIMU __io(NETX_VA_MIIMU)
244 244
245/* Bits */ 245/* Bits */
246#define MIIMU_SNRDY (1<<0) 246#define MIIMU_SNRDY (1<<0)
@@ -317,7 +317,7 @@
317 *******************************/ 317 *******************************/
318 318
319/* Registers */ 319/* Registers */
320#define NETX_PFIFO_REG(ofs) IOMEM(NETX_VA_PFIFO + (ofs)) 320#define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs))
321#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2)) 321#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2))
322#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2)) 322#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2))
323#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100) 323#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100)
@@ -334,7 +334,7 @@
334 *******************************/ 334 *******************************/
335 335
336/* Registers */ 336/* Registers */
337#define NETX_MEMCR_REG(ofs) IOMEM(NETX_VA_MEMCR + (ofs)) 337#define NETX_MEMCR_REG(ofs) __io(NETX_VA_MEMCR + (ofs))
338#define NETX_MEMCR_SRAM_CTRL(cs) NETX_MEMCR_REG(0x0 + 4 * (cs)) /* SRAM for CS 0..2 */ 338#define NETX_MEMCR_SRAM_CTRL(cs) NETX_MEMCR_REG(0x0 + 4 * (cs)) /* SRAM for CS 0..2 */
339#define NETX_MEMCR_SDRAM_CFG_CTRL NETX_MEMCR_REG(0x40) 339#define NETX_MEMCR_SDRAM_CFG_CTRL NETX_MEMCR_REG(0x40)
340#define NETX_MEMCR_SDRAM_TIMING_CTRL NETX_MEMCR_REG(0x44) 340#define NETX_MEMCR_SDRAM_TIMING_CTRL NETX_MEMCR_REG(0x44)
@@ -355,7 +355,7 @@
355 *******************************/ 355 *******************************/
356 356
357/* Registers */ 357/* Registers */
358#define NETX_DPMAS_REG(ofs) IOMEM(NETX_VA_DPMAS + (ofs)) 358#define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs))
359#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8) 359#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8)
360#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0) 360#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0)
361#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0) 361#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0)
@@ -425,7 +425,7 @@
425/******************************* 425/*******************************
426 * I2C * 426 * I2C *
427 *******************************/ 427 *******************************/
428#define NETX_I2C_REG(ofs) IOMEM(NETX_VA_I2C, (ofs)) 428#define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs))
429#define NETX_I2C_CTRL NETX_I2C_REG(0x0) 429#define NETX_I2C_CTRL NETX_I2C_REG(0x0)
430#define NETX_I2C_DATA NETX_I2C_REG(0x4) 430#define NETX_I2C_DATA NETX_I2C_REG(0x4)
431 431
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c
index 8b781ff7c9e..ca8b203a3c9 100644
--- a/arch/arm/mach-netx/nxdb500.c
+++ b/arch/arm/mach-netx/nxdb500.c
@@ -28,9 +28,8 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <mach/eth.h>
34 33
35#include "generic.h" 34#include "generic.h"
36#include "fb.h" 35#include "fb.h"
@@ -201,11 +200,9 @@ static void __init nxdb500_init(void)
201} 200}
202 201
203MACHINE_START(NXDB500, "Hilscher nxdb500") 202MACHINE_START(NXDB500, "Hilscher nxdb500")
204 .atag_offset = 0x100, 203 .boot_params = 0x80000100,
205 .map_io = netx_map_io, 204 .map_io = netx_map_io,
206 .init_irq = netx_init_irq, 205 .init_irq = netx_init_irq,
207 .handle_irq = vic_handle_irq,
208 .timer = &netx_timer, 206 .timer = &netx_timer,
209 .init_machine = nxdb500_init, 207 .init_machine = nxdb500_init,
210 .restart = netx_restart,
211MACHINE_END 208MACHINE_END
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c
index b26dbce334f..d775cbe0727 100644
--- a/arch/arm/mach-netx/nxdkn.c
+++ b/arch/arm/mach-netx/nxdkn.c
@@ -28,9 +28,8 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <mach/eth.h>
34 33
35#include "generic.h" 34#include "generic.h"
36 35
@@ -94,11 +93,9 @@ static void __init nxdkn_init(void)
94} 93}
95 94
96MACHINE_START(NXDKN, "Hilscher nxdkn") 95MACHINE_START(NXDKN, "Hilscher nxdkn")
97 .atag_offset = 0x100, 96 .boot_params = 0x80000100,
98 .map_io = netx_map_io, 97 .map_io = netx_map_io,
99 .init_irq = netx_init_irq, 98 .init_irq = netx_init_irq,
100 .handle_irq = vic_handle_irq,
101 .timer = &netx_timer, 99 .timer = &netx_timer,
102 .init_machine = nxdkn_init, 100 .init_machine = nxdkn_init,
103 .restart = netx_restart,
104MACHINE_END 101MACHINE_END
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c
index 257382efafa..de369cd1dcb 100644
--- a/arch/arm/mach-netx/nxeb500hmi.c
+++ b/arch/arm/mach-netx/nxeb500hmi.c
@@ -28,9 +28,8 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <mach/eth.h>
34 33
35#include "generic.h" 34#include "generic.h"
36#include "fb.h" 35#include "fb.h"
@@ -178,11 +177,9 @@ static void __init nxeb500hmi_init(void)
178} 177}
179 178
180MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi") 179MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi")
181 .atag_offset = 0x100, 180 .boot_params = 0x80000100,
182 .map_io = netx_map_io, 181 .map_io = netx_map_io,
183 .init_irq = netx_init_irq, 182 .init_irq = netx_init_irq,
184 .handle_irq = vic_handle_irq,
185 .timer = &netx_timer, 183 .timer = &netx_timer,
186 .init_machine = nxeb500hmi_init, 184 .init_machine = nxeb500hmi_init,
187 .restart = netx_restart,
188MACHINE_END 185MACHINE_END
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
index f1c972d87ba..f009b54e8d2 100644
--- a/arch/arm/mach-netx/xc.c
+++ b/arch/arm/mach-netx/xc.c
@@ -23,7 +23,6 @@
23#include <linux/mutex.h> 23#include <linux/mutex.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/export.h>
27 26
28#include <mach/hardware.h> 27#include <mach/hardware.h>
29#include <mach/irqs.h> 28#include <mach/irqs.h>
@@ -136,7 +135,7 @@ int xc_request_firmware(struct xc *x)
136 if (head->magic != 0x4e657458) { 135 if (head->magic != 0x4e657458) {
137 if (head->magic == 0x5874654e) { 136 if (head->magic == 0x5874654e) {
138 dev_err(x->dev, 137 dev_err(x->dev,
139 "firmware magic is 'XteN'. Endianness problems?\n"); 138 "firmware magic is 'XteN'. Endianess problems?\n");
140 ret = -ENODEV; 139 ret = -ENODEV;
141 goto exit_release_firmware; 140 goto exit_release_firmware;
142 } 141 }