diff options
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/io.h | 8 | ||||
-rw-r--r-- | arch/sh/include/asm/machvec.h | 9 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh4/cpu/sh7724.h | 1 | ||||
-rw-r--r-- | arch/sh/include/mach-common/mach/romimage.h | 10 | ||||
-rw-r--r-- | arch/sh/include/mach-ecovec24/mach/romimage.h | 27 | ||||
-rw-r--r-- | arch/sh/include/mach-kfr2r09/mach/romimage.h | 10 |
6 files changed, 61 insertions, 4 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index f689554e17c1..b237d525d592 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <asm/io_generic.h> | 39 | #include <asm/io_generic.h> |
40 | #include <asm/io_trapped.h> | 40 | #include <asm/io_trapped.h> |
41 | 41 | ||
42 | #ifdef CONFIG_HAS_IOPORT | ||
43 | |||
42 | #define inb(p) sh_mv.mv_inb((p)) | 44 | #define inb(p) sh_mv.mv_inb((p)) |
43 | #define inw(p) sh_mv.mv_inw((p)) | 45 | #define inw(p) sh_mv.mv_inw((p)) |
44 | #define inl(p) sh_mv.mv_inl((p)) | 46 | #define inl(p) sh_mv.mv_inl((p)) |
@@ -60,6 +62,8 @@ | |||
60 | #define outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c)) | 62 | #define outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c)) |
61 | #define outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c)) | 63 | #define outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c)) |
62 | 64 | ||
65 | #endif | ||
66 | |||
63 | #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v)) | 67 | #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v)) |
64 | #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v)) | 68 | #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v)) |
65 | #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v)) | 69 | #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v)) |
@@ -240,6 +244,8 @@ __BUILD_MEMORY_STRING(q, u64) | |||
240 | 244 | ||
241 | #define IO_SPACE_LIMIT 0xffffffff | 245 | #define IO_SPACE_LIMIT 0xffffffff |
242 | 246 | ||
247 | #ifdef CONFIG_HAS_IOPORT | ||
248 | |||
243 | /* | 249 | /* |
244 | * This function provides a method for the generic case where a | 250 | * This function provides a method for the generic case where a |
245 | * board-specific ioport_map simply needs to return the port + some | 251 | * board-specific ioport_map simply needs to return the port + some |
@@ -255,6 +261,8 @@ static inline void __set_io_port_base(unsigned long pbase) | |||
255 | 261 | ||
256 | #define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) | 262 | #define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) |
257 | 263 | ||
264 | #endif | ||
265 | |||
258 | /* We really want to try and get these to memcpy etc */ | 266 | /* We really want to try and get these to memcpy etc */ |
259 | void memcpy_fromio(void *, const volatile void __iomem *, unsigned long); | 267 | void memcpy_fromio(void *, const volatile void __iomem *, unsigned long); |
260 | void memcpy_toio(volatile void __iomem *, const void *, unsigned long); | 268 | void memcpy_toio(volatile void __iomem *, const void *, unsigned long); |
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index bc0218cb72e1..a0b0cf79cf8a 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h | |||
@@ -19,6 +19,10 @@ struct sh_machine_vector { | |||
19 | const char *mv_name; | 19 | const char *mv_name; |
20 | int mv_nr_irqs; | 20 | int mv_nr_irqs; |
21 | 21 | ||
22 | int (*mv_irq_demux)(int irq); | ||
23 | void (*mv_init_irq)(void); | ||
24 | |||
25 | #ifdef CONFIG_HAS_IOPORT | ||
22 | u8 (*mv_inb)(unsigned long); | 26 | u8 (*mv_inb)(unsigned long); |
23 | u16 (*mv_inw)(unsigned long); | 27 | u16 (*mv_inw)(unsigned long); |
24 | u32 (*mv_inl)(unsigned long); | 28 | u32 (*mv_inl)(unsigned long); |
@@ -40,12 +44,9 @@ struct sh_machine_vector { | |||
40 | void (*mv_outsw)(unsigned long, const void *src, unsigned long count); | 44 | void (*mv_outsw)(unsigned long, const void *src, unsigned long count); |
41 | void (*mv_outsl)(unsigned long, const void *src, unsigned long count); | 45 | void (*mv_outsl)(unsigned long, const void *src, unsigned long count); |
42 | 46 | ||
43 | int (*mv_irq_demux)(int irq); | ||
44 | |||
45 | void (*mv_init_irq)(void); | ||
46 | |||
47 | void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); | 47 | void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); |
48 | void (*mv_ioport_unmap)(void __iomem *); | 48 | void (*mv_ioport_unmap)(void __iomem *); |
49 | #endif | ||
49 | 50 | ||
50 | int (*mv_clk_init)(void); | 51 | int (*mv_clk_init)(void); |
51 | int (*mv_mode_pins)(void); | 52 | int (*mv_mode_pins)(void); |
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h index fbbf550cc529..4c27b68789b3 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * MD3: BSC - Area0 Bus Width (16/32-bit) [CS0BCR.9,10] | 9 | * MD3: BSC - Area0 Bus Width (16/32-bit) [CS0BCR.9,10] |
10 | * MD5: BSC - Endian Mode (L: Big, H: Little) [CMNCR.3] | 10 | * MD5: BSC - Endian Mode (L: Big, H: Little) [CMNCR.3] |
11 | * MD8: Test Mode | 11 | * MD8: Test Mode |
12 | * BOOT: FBR - Boot Mode (L: MMCIF, H: Area0) | ||
12 | */ | 13 | */ |
13 | 14 | ||
14 | /* Pin Function Controller: | 15 | /* Pin Function Controller: |
diff --git a/arch/sh/include/mach-common/mach/romimage.h b/arch/sh/include/mach-common/mach/romimage.h index 267e24112d82..08fb42269ecd 100644 --- a/arch/sh/include/mach-common/mach/romimage.h +++ b/arch/sh/include/mach-common/mach/romimage.h | |||
@@ -1 +1,11 @@ | |||
1 | #ifdef __ASSEMBLY__ | ||
2 | |||
1 | /* do nothing here by default */ | 3 | /* do nothing here by default */ |
4 | |||
5 | #else /* __ASSEMBLY__ */ | ||
6 | |||
7 | extern inline void mmcif_update_progress(int nr) | ||
8 | { | ||
9 | } | ||
10 | |||
11 | #endif /* __ASSEMBLY__ */ | ||
diff --git a/arch/sh/include/mach-ecovec24/mach/romimage.h b/arch/sh/include/mach-ecovec24/mach/romimage.h index 1c8787ecb1c1..1dcf5e6c8d83 100644 --- a/arch/sh/include/mach-ecovec24/mach/romimage.h +++ b/arch/sh/include/mach-ecovec24/mach/romimage.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifdef __ASSEMBLY__ | ||
2 | |||
1 | /* EcoVec board specific boot code: | 3 | /* EcoVec board specific boot code: |
2 | * converts the "partner-jet-script.txt" script into assembly | 4 | * converts the "partner-jet-script.txt" script into assembly |
3 | * the assembly code is the first code to be executed in the romImage | 5 | * the assembly code is the first code to be executed in the romImage |
@@ -18,3 +20,28 @@ | |||
18 | .align 2 | 20 | .align 2 |
19 | 1 : .long 0xa8000000 | 21 | 1 : .long 0xa8000000 |
20 | 2 : | 22 | 2 : |
23 | |||
24 | #else /* __ASSEMBLY__ */ | ||
25 | |||
26 | /* Ecovec board specific information: | ||
27 | * | ||
28 | * Set the following to enable MMCIF boot from the MMC card in CN12: | ||
29 | * | ||
30 | * DS1.5 = OFF (SH BOOT pin set to L) | ||
31 | * DS2.6 = OFF (Select MMCIF on CN12 instead of SDHI1) | ||
32 | * DS2.7 = ON (Select MMCIF on CN12 instead of SDHI1) | ||
33 | * | ||
34 | */ | ||
35 | #define HIZCRA 0xa4050158 | ||
36 | #define PGDR 0xa405012c | ||
37 | |||
38 | extern inline void mmcif_update_progress(int nr) | ||
39 | { | ||
40 | /* disable Hi-Z for LED pins */ | ||
41 | __raw_writew(__raw_readw(HIZCRA) & ~(1 << 1), HIZCRA); | ||
42 | |||
43 | /* update progress on LED4, LED5, LED6 and LED7 */ | ||
44 | __raw_writeb(1 << (nr - 1), PGDR); | ||
45 | } | ||
46 | |||
47 | #endif /* __ASSEMBLY__ */ | ||
diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h index a110823f2bde..976256a323f2 100644 --- a/arch/sh/include/mach-kfr2r09/mach/romimage.h +++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifdef __ASSEMBLY__ | ||
2 | |||
1 | /* kfr2r09 board specific boot code: | 3 | /* kfr2r09 board specific boot code: |
2 | * converts the "partner-jet-script.txt" script into assembly | 4 | * converts the "partner-jet-script.txt" script into assembly |
3 | * the assembly code is the first code to be executed in the romImage | 5 | * the assembly code is the first code to be executed in the romImage |
@@ -18,3 +20,11 @@ | |||
18 | .align 2 | 20 | .align 2 |
19 | 1: .long 0xa8000000 | 21 | 1: .long 0xa8000000 |
20 | 2: | 22 | 2: |
23 | |||
24 | #else /* __ASSEMBLY__ */ | ||
25 | |||
26 | extern inline void mmcif_update_progress(int nr) | ||
27 | { | ||
28 | } | ||
29 | |||
30 | #endif /* __ASSEMBLY__ */ | ||