Loading arch/sh/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ config SUPERH select EMBEDDED select HAVE_CLK select HAVE_IDE select HAVE_LMB select HAVE_OPROFILE select HAVE_GENERIC_DMA_COHERENT select HAVE_IOREMAP_PROT if MMU Loading arch/sh/boards/mach-se/7724/setup.c +38 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/smc91x.h> #include <linux/gpio.h> #include <linux/input.h> #include <linux/usb/r8a66597.h> #include <video/sh_mobile_lcdc.h> #include <media/sh_mobile_ceu.h> #include <asm/io.h> Loading Loading @@ -302,6 +303,34 @@ static struct platform_device sh_eth_device = { .resource = sh_eth_resources, }; static struct r8a66597_platdata sh7724_usb0_host_data = { }; static struct resource sh7724_usb0_host_resources[] = { [0] = { .start = 0xa4d80000, .end = 0xa4d800ff, .flags = IORESOURCE_MEM, }, [1] = { .start = 65, .end = 65, .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, }, }; static struct platform_device sh7724_usb0_host_device = { .name = "r8a66597_hcd", .id = 0, .dev = { .dma_mask = NULL, /* not use dma */ .coherent_dma_mask = 0xffffffff, .platform_data = &sh7724_usb0_host_data, }, .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), .resource = sh7724_usb0_host_resources, }; static struct platform_device *ms7724se_devices[] __initdata = { &heartbeat_device, &smc91x_eth_device, Loading @@ -311,6 +340,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { &ceu1_device, &keysc_device, &sh_eth_device, &sh7724_usb0_host_device, }; #define EEPROM_OP 0xBA206000 Loading Loading @@ -364,6 +394,7 @@ static void __init sh_eth_init(void) #define SW4140 0xBA201000 #define FPGA_OUT 0xBA200400 #define PORT_HIZA 0xA4050158 #define PORT_MSELCRB 0xA4050182 #define SW41_A 0x0100 #define SW41_B 0x0200 Loading @@ -373,6 +404,7 @@ static void __init sh_eth_init(void) #define SW41_F 0x2000 #define SW41_G 0x4000 #define SW41_H 0x8000 static int __init devices_setup(void) { u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ Loading @@ -385,6 +417,12 @@ static int __init devices_setup(void) (1 << 14)), /* RMII */ FPGA_OUT); /* turn on USB clocks, use external clock */ ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); /* enable USB0 port */ ctrl_outw(0x0600, 0xa40501d4); /* enable IRQ 0,1,2 */ gpio_request(GPIO_FN_INTC_IRQ0, NULL); gpio_request(GPIO_FN_INTC_IRQ1, NULL); Loading arch/sh/include/asm/hwblk.h 0 → 100644 +61 −0 Original line number Diff line number Diff line #ifndef __ASM_SH_HWBLK_H #define __ASM_SH_HWBLK_H #include <asm/clock.h> #include <asm/io.h> #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */ #define HWBLK_AREA(_flags, _parent) \ { \ .flags = _flags, \ .parent = _parent, \ } struct hwblk_area { unsigned long cnt; unsigned char parent; unsigned char flags; }; #define HWBLK(_mstp, _bit, _area) \ { \ .mstp = (void __iomem *)_mstp, \ .bit = _bit, \ .area = _area, \ } struct hwblk { void __iomem *mstp; unsigned char bit; unsigned char area; unsigned long cnt; }; struct hwblk_info { struct hwblk_area *areas; int nr_areas; struct hwblk *hwblks; int nr_hwblks; }; /* Should be defined by processor-specific code */ int arch_hwblk_init(void); int arch_hwblk_sleep_mode(void); int hwblk_register(struct hwblk_info *info); int hwblk_init(void); /* allow clocks to enable and disable hardware blocks */ #define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \ { \ .name = _name, \ .id = _id, \ .parent = _parent, \ .arch_flags = _hwblk, \ .flags = _flags, \ } int sh_hwblk_clk_register(struct clk *clks, int nr); #endif /* __ASM_SH_HWBLK_H */ arch/sh/include/asm/lmb.h 0 → 100644 +6 −0 Original line number Diff line number Diff line #ifndef __ASM_SH_LMB_H #define __ASM_SH_LMB_H #define LMB_REAL_LIMIT 0 #endif /* __ASM_SH_LMB_H */ arch/sh/include/asm/perf_counter.h +2 −0 Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ /* SH only supports software counters through this interface. */ static inline void set_perf_counter_pending(void) {} #define PERF_COUNTER_INDEX_OFFSET 0 #endif /* __ASM_SH_PERF_COUNTER_H */ Loading
arch/sh/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ config SUPERH select EMBEDDED select HAVE_CLK select HAVE_IDE select HAVE_LMB select HAVE_OPROFILE select HAVE_GENERIC_DMA_COHERENT select HAVE_IOREMAP_PROT if MMU Loading
arch/sh/boards/mach-se/7724/setup.c +38 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/smc91x.h> #include <linux/gpio.h> #include <linux/input.h> #include <linux/usb/r8a66597.h> #include <video/sh_mobile_lcdc.h> #include <media/sh_mobile_ceu.h> #include <asm/io.h> Loading Loading @@ -302,6 +303,34 @@ static struct platform_device sh_eth_device = { .resource = sh_eth_resources, }; static struct r8a66597_platdata sh7724_usb0_host_data = { }; static struct resource sh7724_usb0_host_resources[] = { [0] = { .start = 0xa4d80000, .end = 0xa4d800ff, .flags = IORESOURCE_MEM, }, [1] = { .start = 65, .end = 65, .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, }, }; static struct platform_device sh7724_usb0_host_device = { .name = "r8a66597_hcd", .id = 0, .dev = { .dma_mask = NULL, /* not use dma */ .coherent_dma_mask = 0xffffffff, .platform_data = &sh7724_usb0_host_data, }, .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), .resource = sh7724_usb0_host_resources, }; static struct platform_device *ms7724se_devices[] __initdata = { &heartbeat_device, &smc91x_eth_device, Loading @@ -311,6 +340,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { &ceu1_device, &keysc_device, &sh_eth_device, &sh7724_usb0_host_device, }; #define EEPROM_OP 0xBA206000 Loading Loading @@ -364,6 +394,7 @@ static void __init sh_eth_init(void) #define SW4140 0xBA201000 #define FPGA_OUT 0xBA200400 #define PORT_HIZA 0xA4050158 #define PORT_MSELCRB 0xA4050182 #define SW41_A 0x0100 #define SW41_B 0x0200 Loading @@ -373,6 +404,7 @@ static void __init sh_eth_init(void) #define SW41_F 0x2000 #define SW41_G 0x4000 #define SW41_H 0x8000 static int __init devices_setup(void) { u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ Loading @@ -385,6 +417,12 @@ static int __init devices_setup(void) (1 << 14)), /* RMII */ FPGA_OUT); /* turn on USB clocks, use external clock */ ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); /* enable USB0 port */ ctrl_outw(0x0600, 0xa40501d4); /* enable IRQ 0,1,2 */ gpio_request(GPIO_FN_INTC_IRQ0, NULL); gpio_request(GPIO_FN_INTC_IRQ1, NULL); Loading
arch/sh/include/asm/hwblk.h 0 → 100644 +61 −0 Original line number Diff line number Diff line #ifndef __ASM_SH_HWBLK_H #define __ASM_SH_HWBLK_H #include <asm/clock.h> #include <asm/io.h> #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */ #define HWBLK_AREA(_flags, _parent) \ { \ .flags = _flags, \ .parent = _parent, \ } struct hwblk_area { unsigned long cnt; unsigned char parent; unsigned char flags; }; #define HWBLK(_mstp, _bit, _area) \ { \ .mstp = (void __iomem *)_mstp, \ .bit = _bit, \ .area = _area, \ } struct hwblk { void __iomem *mstp; unsigned char bit; unsigned char area; unsigned long cnt; }; struct hwblk_info { struct hwblk_area *areas; int nr_areas; struct hwblk *hwblks; int nr_hwblks; }; /* Should be defined by processor-specific code */ int arch_hwblk_init(void); int arch_hwblk_sleep_mode(void); int hwblk_register(struct hwblk_info *info); int hwblk_init(void); /* allow clocks to enable and disable hardware blocks */ #define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \ { \ .name = _name, \ .id = _id, \ .parent = _parent, \ .arch_flags = _hwblk, \ .flags = _flags, \ } int sh_hwblk_clk_register(struct clk *clks, int nr); #endif /* __ASM_SH_HWBLK_H */
arch/sh/include/asm/lmb.h 0 → 100644 +6 −0 Original line number Diff line number Diff line #ifndef __ASM_SH_LMB_H #define __ASM_SH_LMB_H #define LMB_REAL_LIMIT 0 #endif /* __ASM_SH_LMB_H */
arch/sh/include/asm/perf_counter.h +2 −0 Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ /* SH only supports software counters through this interface. */ static inline void set_perf_counter_pending(void) {} #define PERF_COUNTER_INDEX_OFFSET 0 #endif /* __ASM_SH_PERF_COUNTER_H */