diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-cns3xxx/cns3420vb.c | 54 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/cns3xxx.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/pm.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/pm.c | 4 |
4 files changed, 62 insertions, 2 deletions
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 90fe9ab8591d..08e5c8759502 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/dma-mapping.h> | ||
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/serial_8250.h> | 22 | #include <linux/serial_8250.h> |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
@@ -108,10 +109,63 @@ static void __init cns3420_early_serial_setup(void) | |||
108 | } | 109 | } |
109 | 110 | ||
110 | /* | 111 | /* |
112 | * USB | ||
113 | */ | ||
114 | static struct resource cns3xxx_usb_ehci_resources[] = { | ||
115 | [0] = { | ||
116 | .start = CNS3XXX_USB_BASE, | ||
117 | .end = CNS3XXX_USB_BASE + SZ_16M - 1, | ||
118 | .flags = IORESOURCE_MEM, | ||
119 | }, | ||
120 | [1] = { | ||
121 | .start = IRQ_CNS3XXX_USB_EHCI, | ||
122 | .flags = IORESOURCE_IRQ, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32); | ||
127 | |||
128 | static struct platform_device cns3xxx_usb_ehci_device = { | ||
129 | .name = "cns3xxx-ehci", | ||
130 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources), | ||
131 | .resource = cns3xxx_usb_ehci_resources, | ||
132 | .dev = { | ||
133 | .dma_mask = &cns3xxx_usb_ehci_dma_mask, | ||
134 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
135 | }, | ||
136 | }; | ||
137 | |||
138 | static struct resource cns3xxx_usb_ohci_resources[] = { | ||
139 | [0] = { | ||
140 | .start = CNS3XXX_USB_OHCI_BASE, | ||
141 | .end = CNS3XXX_USB_OHCI_BASE + SZ_16M - 1, | ||
142 | .flags = IORESOURCE_MEM, | ||
143 | }, | ||
144 | [1] = { | ||
145 | .start = IRQ_CNS3XXX_USB_OHCI, | ||
146 | .flags = IORESOURCE_IRQ, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32); | ||
151 | |||
152 | static struct platform_device cns3xxx_usb_ohci_device = { | ||
153 | .name = "cns3xxx-ohci", | ||
154 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources), | ||
155 | .resource = cns3xxx_usb_ohci_resources, | ||
156 | .dev = { | ||
157 | .dma_mask = &cns3xxx_usb_ohci_dma_mask, | ||
158 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | /* | ||
111 | * Initialization | 163 | * Initialization |
112 | */ | 164 | */ |
113 | static struct platform_device *cns3420_pdevs[] __initdata = { | 165 | static struct platform_device *cns3420_pdevs[] __initdata = { |
114 | &cns3420_nor_pdev, | 166 | &cns3420_nor_pdev, |
167 | &cns3xxx_usb_ehci_device, | ||
168 | &cns3xxx_usb_ohci_device, | ||
115 | }; | 169 | }; |
116 | 170 | ||
117 | static void __init cns3420_init(void) | 171 | static void __init cns3420_init(void) |
diff --git a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h b/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h index 6dbce13771ca..191c8e57f289 100644 --- a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h +++ b/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h | |||
@@ -165,7 +165,6 @@ | |||
165 | #define CNS3XXX_USBOTG_BASE_VIRT 0xFFF15000 | 165 | #define CNS3XXX_USBOTG_BASE_VIRT 0xFFF15000 |
166 | 166 | ||
167 | #define CNS3XXX_USB_BASE 0x82000000 /* USB Host Control */ | 167 | #define CNS3XXX_USB_BASE 0x82000000 /* USB Host Control */ |
168 | #define CNS3XXX_USB_BASE_VIRT 0xFFF16000 | ||
169 | 168 | ||
170 | #define CNS3XXX_SATA2_BASE 0x83000000 /* SATA */ | 169 | #define CNS3XXX_SATA2_BASE 0x83000000 /* SATA */ |
171 | #define CNS3XXX_SATA2_SIZE SZ_16M | 170 | #define CNS3XXX_SATA2_SIZE SZ_16M |
@@ -184,7 +183,6 @@ | |||
184 | #define CNS3XXX_2DG_BASE_VIRT 0xFFF1B000 | 183 | #define CNS3XXX_2DG_BASE_VIRT 0xFFF1B000 |
185 | 184 | ||
186 | #define CNS3XXX_USB_OHCI_BASE 0x88000000 /* USB OHCI */ | 185 | #define CNS3XXX_USB_OHCI_BASE 0x88000000 /* USB OHCI */ |
187 | #define CNS3XXX_USB_OHCI_BASE_VIRT 0xFFF1C000 | ||
188 | 186 | ||
189 | #define CNS3XXX_L2C_BASE 0x92000000 /* L2 Cache Control */ | 187 | #define CNS3XXX_L2C_BASE 0x92000000 /* L2 Cache Control */ |
190 | #define CNS3XXX_L2C_BASE_VIRT 0xFFF27000 | 188 | #define CNS3XXX_L2C_BASE_VIRT 0xFFF27000 |
diff --git a/arch/arm/mach-cns3xxx/include/mach/pm.h b/arch/arm/mach-cns3xxx/include/mach/pm.h index 102617bdb45b..6eae7f764d1d 100644 --- a/arch/arm/mach-cns3xxx/include/mach/pm.h +++ b/arch/arm/mach-cns3xxx/include/mach/pm.h | |||
@@ -11,9 +11,13 @@ | |||
11 | #ifndef __CNS3XXX_PM_H | 11 | #ifndef __CNS3XXX_PM_H |
12 | #define __CNS3XXX_PM_H | 12 | #define __CNS3XXX_PM_H |
13 | 13 | ||
14 | #include <asm/atomic.h> | ||
15 | |||
14 | void cns3xxx_pwr_clk_en(unsigned int block); | 16 | void cns3xxx_pwr_clk_en(unsigned int block); |
15 | void cns3xxx_pwr_clk_dis(unsigned int block); | 17 | void cns3xxx_pwr_clk_dis(unsigned int block); |
16 | void cns3xxx_pwr_power_up(unsigned int block); | 18 | void cns3xxx_pwr_power_up(unsigned int block); |
17 | void cns3xxx_pwr_power_down(unsigned int block); | 19 | void cns3xxx_pwr_power_down(unsigned int block); |
18 | 20 | ||
21 | extern atomic_t usb_pwr_ref; | ||
22 | |||
19 | #endif /* __CNS3XXX_PM_H */ | 23 | #endif /* __CNS3XXX_PM_H */ |
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c index c047c1a2bc2a..5e579552aa54 100644 --- a/arch/arm/mach-cns3xxx/pm.c +++ b/arch/arm/mach-cns3xxx/pm.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <asm/atomic.h> | ||
13 | #include <mach/system.h> | 14 | #include <mach/system.h> |
14 | #include <mach/cns3xxx.h> | 15 | #include <mach/cns3xxx.h> |
15 | #include <mach/pm.h> | 16 | #include <mach/pm.h> |
@@ -118,3 +119,6 @@ int cns3xxx_cpu_clock(void) | |||
118 | return cpu; | 119 | return cpu; |
119 | } | 120 | } |
120 | EXPORT_SYMBOL(cns3xxx_cpu_clock); | 121 | EXPORT_SYMBOL(cns3xxx_cpu_clock); |
122 | |||
123 | atomic_t usb_pwr_ref = ATOMIC_INIT(0); | ||
124 | EXPORT_SYMBOL(usb_pwr_ref); | ||