diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 14 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 87 | ||||
-rw-r--r-- | arch/sh/boot/romimage/Makefile | 13 | ||||
-rw-r--r-- | arch/sh/boot/romimage/head.S | 42 | ||||
-rw-r--r-- | arch/sh/boot/romimage/mmcif-sh7724.c | 72 | ||||
-rw-r--r-- | arch/sh/boot/romimage/vmlinux.scr | 2 | ||||
-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 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 23 |
11 files changed, 268 insertions, 33 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 1eef24d04bbf..573fca1fbd9b 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -189,6 +189,9 @@ config DMA_NONCOHERENT | |||
189 | config NEED_DMA_MAP_STATE | 189 | config NEED_DMA_MAP_STATE |
190 | def_bool DMA_NONCOHERENT | 190 | def_bool DMA_NONCOHERENT |
191 | 191 | ||
192 | config NEED_SG_DMA_LENGTH | ||
193 | def_bool y | ||
194 | |||
192 | source "init/Kconfig" | 195 | source "init/Kconfig" |
193 | 196 | ||
194 | source "kernel/Kconfig.freezer" | 197 | source "kernel/Kconfig.freezer" |
@@ -776,6 +779,17 @@ config ENTRY_OFFSET | |||
776 | default "0x00010000" if PAGE_SIZE_64KB | 779 | default "0x00010000" if PAGE_SIZE_64KB |
777 | default "0x00000000" | 780 | default "0x00000000" |
778 | 781 | ||
782 | config ROMIMAGE_MMCIF | ||
783 | bool "Include MMCIF loader in romImage (EXPERIMENTAL)" | ||
784 | depends on CPU_SUBTYPE_SH7724 && EXPERIMENTAL | ||
785 | help | ||
786 | Say Y here to include experimental MMCIF loading code in | ||
787 | romImage. With this enabled it is possible to write the romImage | ||
788 | kernel image to an MMC card and boot the kernel straight from | ||
789 | the reset vector. At reset the processor Mask ROM will load the | ||
790 | first part of the romImage which in turn loads the rest the kernel | ||
791 | image to RAM using the MMCIF hardware block. | ||
792 | |||
779 | choice | 793 | choice |
780 | prompt "Kernel command line" | 794 | prompt "Kernel command line" |
781 | optional | 795 | optional |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 49714258732e..778eb7cb9873 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mfd/sh_mobile_sdhi.h> | 14 | #include <linux/mfd/sh_mobile_sdhi.h> |
15 | #include <linux/mmc/host.h> | ||
16 | #include <linux/mmc/sh_mmcif.h> | ||
15 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
16 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
17 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
@@ -26,7 +28,6 @@ | |||
26 | #include <linux/mmc/host.h> | 28 | #include <linux/mmc/host.h> |
27 | #include <linux/input.h> | 29 | #include <linux/input.h> |
28 | #include <linux/input/sh_keysc.h> | 30 | #include <linux/input/sh_keysc.h> |
29 | #include <linux/mfd/sh_mobile_sdhi.h> | ||
30 | #include <video/sh_mobile_lcdc.h> | 31 | #include <video/sh_mobile_lcdc.h> |
31 | #include <sound/sh_fsi.h> | 32 | #include <sound/sh_fsi.h> |
32 | #include <media/sh_mobile_ceu.h> | 33 | #include <media/sh_mobile_ceu.h> |
@@ -436,7 +437,7 @@ static struct i2c_board_info ts_i2c_clients = { | |||
436 | }; | 437 | }; |
437 | 438 | ||
438 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI | 439 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI |
439 | /* SHDI0 */ | 440 | /* SDHI0 */ |
440 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) | 441 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) |
441 | { | 442 | { |
442 | gpio_set_value(GPIO_PTB6, state); | 443 | gpio_set_value(GPIO_PTB6, state); |
@@ -474,7 +475,8 @@ static struct platform_device sdhi0_device = { | |||
474 | }, | 475 | }, |
475 | }; | 476 | }; |
476 | 477 | ||
477 | /* SHDI1 */ | 478 | #if !defined(CONFIG_MMC_SH_MMCIF) |
479 | /* SDHI1 */ | ||
478 | static void sdhi1_set_pwr(struct platform_device *pdev, int state) | 480 | static void sdhi1_set_pwr(struct platform_device *pdev, int state) |
479 | { | 481 | { |
480 | gpio_set_value(GPIO_PTB7, state); | 482 | gpio_set_value(GPIO_PTB7, state); |
@@ -511,6 +513,7 @@ static struct platform_device sdhi1_device = { | |||
511 | .hwblk_id = HWBLK_SDHI1, | 513 | .hwblk_id = HWBLK_SDHI1, |
512 | }, | 514 | }, |
513 | }; | 515 | }; |
516 | #endif /* CONFIG_MMC_SH_MMCIF */ | ||
514 | 517 | ||
515 | #else | 518 | #else |
516 | 519 | ||
@@ -819,6 +822,58 @@ static struct platform_device vou_device = { | |||
819 | }, | 822 | }, |
820 | }; | 823 | }; |
821 | 824 | ||
825 | #if defined(CONFIG_MMC_SH_MMCIF) | ||
826 | /* SH_MMCIF */ | ||
827 | static void mmcif_set_pwr(struct platform_device *pdev, int state) | ||
828 | { | ||
829 | gpio_set_value(GPIO_PTB7, state); | ||
830 | } | ||
831 | |||
832 | static void mmcif_down_pwr(struct platform_device *pdev) | ||
833 | { | ||
834 | gpio_set_value(GPIO_PTB7, 0); | ||
835 | } | ||
836 | |||
837 | static struct resource sh_mmcif_resources[] = { | ||
838 | [0] = { | ||
839 | .name = "SH_MMCIF", | ||
840 | .start = 0xA4CA0000, | ||
841 | .end = 0xA4CA00FF, | ||
842 | .flags = IORESOURCE_MEM, | ||
843 | }, | ||
844 | [1] = { | ||
845 | /* MMC2I */ | ||
846 | .start = 29, | ||
847 | .flags = IORESOURCE_IRQ, | ||
848 | }, | ||
849 | [2] = { | ||
850 | /* MMC3I */ | ||
851 | .start = 30, | ||
852 | .flags = IORESOURCE_IRQ, | ||
853 | }, | ||
854 | }; | ||
855 | |||
856 | struct sh_mmcif_plat_data sh_mmcif_plat = { | ||
857 | .set_pwr = mmcif_set_pwr, | ||
858 | .down_pwr = mmcif_down_pwr, | ||
859 | .sup_pclk = 0, /* SH7724: Max Pclk/2 */ | ||
860 | .caps = MMC_CAP_4_BIT_DATA | | ||
861 | MMC_CAP_8_BIT_DATA | | ||
862 | MMC_CAP_NEEDS_POLL, | ||
863 | .ocr = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
864 | }; | ||
865 | |||
866 | static struct platform_device sh_mmcif_device = { | ||
867 | .name = "sh_mmcif", | ||
868 | .id = 0, | ||
869 | .dev = { | ||
870 | .platform_data = &sh_mmcif_plat, | ||
871 | }, | ||
872 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), | ||
873 | .resource = sh_mmcif_resources, | ||
874 | }; | ||
875 | #endif | ||
876 | |||
822 | static struct platform_device *ecovec_devices[] __initdata = { | 877 | static struct platform_device *ecovec_devices[] __initdata = { |
823 | &heartbeat_device, | 878 | &heartbeat_device, |
824 | &nor_flash_device, | 879 | &nor_flash_device, |
@@ -831,7 +886,9 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
831 | &keysc_device, | 886 | &keysc_device, |
832 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI | 887 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI |
833 | &sdhi0_device, | 888 | &sdhi0_device, |
889 | #if !defined(CONFIG_MMC_SH_MMCIF) | ||
834 | &sdhi1_device, | 890 | &sdhi1_device, |
891 | #endif | ||
835 | #else | 892 | #else |
836 | &msiof0_device, | 893 | &msiof0_device, |
837 | #endif | 894 | #endif |
@@ -841,6 +898,9 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
841 | &fsi_device, | 898 | &fsi_device, |
842 | &irda_device, | 899 | &irda_device, |
843 | &vou_device, | 900 | &vou_device, |
901 | #if defined(CONFIG_MMC_SH_MMCIF) | ||
902 | &sh_mmcif_device, | ||
903 | #endif | ||
844 | }; | 904 | }; |
845 | 905 | ||
846 | #ifdef CONFIG_I2C | 906 | #ifdef CONFIG_I2C |
@@ -1134,6 +1194,7 @@ static int __init arch_setup(void) | |||
1134 | gpio_request(GPIO_PTB6, NULL); | 1194 | gpio_request(GPIO_PTB6, NULL); |
1135 | gpio_direction_output(GPIO_PTB6, 0); | 1195 | gpio_direction_output(GPIO_PTB6, 0); |
1136 | 1196 | ||
1197 | #if !defined(CONFIG_MMC_SH_MMCIF) | ||
1137 | /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ | 1198 | /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ |
1138 | gpio_request(GPIO_FN_SDHI1CD, NULL); | 1199 | gpio_request(GPIO_FN_SDHI1CD, NULL); |
1139 | gpio_request(GPIO_FN_SDHI1WP, NULL); | 1200 | gpio_request(GPIO_FN_SDHI1WP, NULL); |
@@ -1148,6 +1209,7 @@ static int __init arch_setup(void) | |||
1148 | 1209 | ||
1149 | /* I/O buffer drive ability is high for SDHI1 */ | 1210 | /* I/O buffer drive ability is high for SDHI1 */ |
1150 | __raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); | 1211 | __raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); |
1212 | #endif /* CONFIG_MMC_SH_MMCIF */ | ||
1151 | #else | 1213 | #else |
1152 | /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ | 1214 | /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ |
1153 | gpio_request(GPIO_FN_MSIOF0_TXD, NULL); | 1215 | gpio_request(GPIO_FN_MSIOF0_TXD, NULL); |
@@ -1223,6 +1285,25 @@ static int __init arch_setup(void) | |||
1223 | gpio_request(GPIO_PTU5, NULL); | 1285 | gpio_request(GPIO_PTU5, NULL); |
1224 | gpio_direction_output(GPIO_PTU5, 0); | 1286 | gpio_direction_output(GPIO_PTU5, 0); |
1225 | 1287 | ||
1288 | #if defined(CONFIG_MMC_SH_MMCIF) | ||
1289 | /* enable MMCIF (needs DS2.6,7 set to OFF,ON) */ | ||
1290 | gpio_request(GPIO_FN_MMC_D7, NULL); | ||
1291 | gpio_request(GPIO_FN_MMC_D6, NULL); | ||
1292 | gpio_request(GPIO_FN_MMC_D5, NULL); | ||
1293 | gpio_request(GPIO_FN_MMC_D4, NULL); | ||
1294 | gpio_request(GPIO_FN_MMC_D3, NULL); | ||
1295 | gpio_request(GPIO_FN_MMC_D2, NULL); | ||
1296 | gpio_request(GPIO_FN_MMC_D1, NULL); | ||
1297 | gpio_request(GPIO_FN_MMC_D0, NULL); | ||
1298 | gpio_request(GPIO_FN_MMC_CLK, NULL); | ||
1299 | gpio_request(GPIO_FN_MMC_CMD, NULL); | ||
1300 | gpio_request(GPIO_PTB7, NULL); | ||
1301 | gpio_direction_output(GPIO_PTB7, 0); | ||
1302 | |||
1303 | /* I/O buffer drive ability is high for MMCIF */ | ||
1304 | __raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); | ||
1305 | #endif | ||
1306 | |||
1226 | /* enable I2C device */ | 1307 | /* enable I2C device */ |
1227 | i2c_register_board_info(0, i2c0_devices, | 1308 | i2c_register_board_info(0, i2c0_devices, |
1228 | ARRAY_SIZE(i2c0_devices)); | 1309 | ARRAY_SIZE(i2c0_devices)); |
diff --git a/arch/sh/boot/romimage/Makefile b/arch/sh/boot/romimage/Makefile index f473a24a2d92..2216ee57f251 100644 --- a/arch/sh/boot/romimage/Makefile +++ b/arch/sh/boot/romimage/Makefile | |||
@@ -1,16 +1,21 @@ | |||
1 | # | 1 | # |
2 | # linux/arch/sh/boot/romimage/Makefile | 2 | # linux/arch/sh/boot/romimage/Makefile |
3 | # | 3 | # |
4 | # create an image suitable for burning to flash from zImage | 4 | # create an romImage file suitable for burning to flash/mmc from zImage |
5 | # | 5 | # |
6 | 6 | ||
7 | targets := vmlinux head.o zeropage.bin piggy.o | 7 | targets := vmlinux head.o zeropage.bin piggy.o |
8 | load-y := 0 | ||
8 | 9 | ||
9 | OBJECTS = $(obj)/head.o | 10 | mmcif-load-$(CONFIG_CPU_SUBTYPE_SH7724) := 0xe5200000 # ILRAM |
10 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart \ | 11 | mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o |
12 | load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y) | ||
13 | obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y) | ||
14 | |||
15 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \ | ||
11 | -T $(obj)/../../kernel/vmlinux.lds | 16 | -T $(obj)/../../kernel/vmlinux.lds |
12 | 17 | ||
13 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE | 18 | $(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE |
14 | $(call if_changed,ld) | 19 | $(call if_changed,ld) |
15 | @: | 20 | @: |
16 | 21 | ||
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S index 93e779a405ec..4671d1b82150 100644 --- a/arch/sh/boot/romimage/head.S +++ b/arch/sh/boot/romimage/head.S | |||
@@ -12,8 +12,40 @@ romstart: | |||
12 | /* include board specific setup code */ | 12 | /* include board specific setup code */ |
13 | #include <mach/romimage.h> | 13 | #include <mach/romimage.h> |
14 | 14 | ||
15 | #ifdef CONFIG_ROMIMAGE_MMCIF | ||
16 | /* load the romImage to above the empty zero page */ | ||
17 | mov.l empty_zero_page_dst, r4 | ||
18 | mov.l empty_zero_page_dst_adj, r5 | ||
19 | add r5, r4 | ||
20 | mov.l bytes_to_load, r5 | ||
21 | mov.l loader_function, r7 | ||
22 | jsr @r7 | ||
23 | mov r4, r15 | ||
24 | |||
25 | mov.l empty_zero_page_dst, r4 | ||
26 | mov.l empty_zero_page_dst_adj, r5 | ||
27 | add r5, r4 | ||
28 | mov.l loaded_code_offs, r5 | ||
29 | add r5, r4 | ||
30 | jmp @r4 | ||
31 | nop | ||
32 | |||
33 | .balign 4 | ||
34 | empty_zero_page_dst_adj: | ||
35 | .long PAGE_SIZE | ||
36 | bytes_to_load: | ||
37 | .long end_data - romstart | ||
38 | loader_function: | ||
39 | .long mmcif_loader | ||
40 | loaded_code_offs: | ||
41 | .long loaded_code - romstart | ||
42 | loaded_code: | ||
43 | #endif /* CONFIG_ROMIMAGE_MMCIF */ | ||
44 | |||
15 | /* copy the empty_zero_page contents to where vmlinux expects it */ | 45 | /* copy the empty_zero_page contents to where vmlinux expects it */ |
16 | mova empty_zero_page_src, r0 | 46 | mova extra_data_pos, r0 |
47 | mov.l extra_data_size, r1 | ||
48 | add r1, r0 | ||
17 | mov.l empty_zero_page_dst, r1 | 49 | mov.l empty_zero_page_dst, r1 |
18 | mov #(PAGE_SHIFT - 4), r4 | 50 | mov #(PAGE_SHIFT - 4), r4 |
19 | mov #1, r3 | 51 | mov #1, r3 |
@@ -37,7 +69,9 @@ romstart: | |||
37 | mov #PAGE_SHIFT, r4 | 69 | mov #PAGE_SHIFT, r4 |
38 | mov #1, r1 | 70 | mov #1, r1 |
39 | shld r4, r1 | 71 | shld r4, r1 |
40 | mova empty_zero_page_src, r0 | 72 | mova extra_data_pos, r0 |
73 | add r1, r0 | ||
74 | mov.l extra_data_size, r1 | ||
41 | add r1, r0 | 75 | add r1, r0 |
42 | jmp @r0 | 76 | jmp @r0 |
43 | nop | 77 | nop |
@@ -45,4 +79,6 @@ romstart: | |||
45 | .align 2 | 79 | .align 2 |
46 | empty_zero_page_dst: | 80 | empty_zero_page_dst: |
47 | .long _text | 81 | .long _text |
48 | empty_zero_page_src: | 82 | extra_data_pos: |
83 | extra_data_size: | ||
84 | .long zero_page_pos - extra_data_pos | ||
diff --git a/arch/sh/boot/romimage/mmcif-sh7724.c b/arch/sh/boot/romimage/mmcif-sh7724.c new file mode 100644 index 000000000000..14863d7292cb --- /dev/null +++ b/arch/sh/boot/romimage/mmcif-sh7724.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * sh7724 MMCIF loader | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/mmc/sh_mmcif.h> | ||
12 | #include <mach/romimage.h> | ||
13 | |||
14 | #define MMCIF_BASE (void __iomem *)0xa4ca0000 | ||
15 | |||
16 | #define MSTPCR2 0xa4150038 | ||
17 | #define PTWCR 0xa4050146 | ||
18 | #define PTXCR 0xa4050148 | ||
19 | #define PSELA 0xa405014e | ||
20 | #define PSELE 0xa4050156 | ||
21 | #define HIZCRC 0xa405015c | ||
22 | #define DRVCRA 0xa405018a | ||
23 | |||
24 | enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, | ||
25 | MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; | ||
26 | |||
27 | /* SH7724 specific MMCIF loader | ||
28 | * | ||
29 | * loads the romImage from an MMC card starting from block 512 | ||
30 | * use the following line to write the romImage to an MMC card | ||
31 | * # dd if=arch/sh/boot/romImage of=/dev/sdx bs=512 seek=512 | ||
32 | */ | ||
33 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | ||
34 | { | ||
35 | mmcif_update_progress(MMCIF_PROGRESS_ENTER); | ||
36 | |||
37 | /* enable clock to the MMCIF hardware block */ | ||
38 | __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); | ||
39 | |||
40 | /* setup pins D7-D0 */ | ||
41 | __raw_writew(0x0000, PTWCR); | ||
42 | |||
43 | /* setup pins MMC_CLK, MMC_CMD */ | ||
44 | __raw_writew(__raw_readw(PTXCR) & ~0x000f, PTXCR); | ||
45 | |||
46 | /* select D3-D0 pin function */ | ||
47 | __raw_writew(__raw_readw(PSELA) & ~0x2000, PSELA); | ||
48 | |||
49 | /* select D7-D4 pin function */ | ||
50 | __raw_writew(__raw_readw(PSELE) & ~0x3000, PSELE); | ||
51 | |||
52 | /* disable Hi-Z for the MMC pins */ | ||
53 | __raw_writew(__raw_readw(HIZCRC) & ~0x0620, HIZCRC); | ||
54 | |||
55 | /* high drive capability for MMC pins */ | ||
56 | __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); | ||
57 | |||
58 | mmcif_update_progress(MMCIF_PROGRESS_INIT); | ||
59 | |||
60 | /* setup MMCIF hardware */ | ||
61 | sh_mmcif_boot_init(MMCIF_BASE); | ||
62 | |||
63 | mmcif_update_progress(MMCIF_PROGRESS_LOAD); | ||
64 | |||
65 | /* load kernel via MMCIF interface */ | ||
66 | sh_mmcif_boot_slurp(MMCIF_BASE, buf, no_bytes); | ||
67 | |||
68 | /* disable clock to the MMCIF hardware block */ | ||
69 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); | ||
70 | |||
71 | mmcif_update_progress(MMCIF_PROGRESS_DONE); | ||
72 | } | ||
diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr index 287c08f8b4bb..590394e2f5f2 100644 --- a/arch/sh/boot/romimage/vmlinux.scr +++ b/arch/sh/boot/romimage/vmlinux.scr | |||
@@ -1,6 +1,8 @@ | |||
1 | SECTIONS | 1 | SECTIONS |
2 | { | 2 | { |
3 | .text : { | 3 | .text : { |
4 | zero_page_pos = .; | ||
4 | *(.data) | 5 | *(.data) |
6 | end_data = .; | ||
5 | } | 7 | } |
6 | } | 8 | } |
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__ */ | ||
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index d4104ce9fe53..6c4bbba2a675 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -436,29 +436,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
436 | 0, sizeof(struct pt_dspregs), | 436 | 0, sizeof(struct pt_dspregs), |
437 | (const void __user *)data); | 437 | (const void __user *)data); |
438 | #endif | 438 | #endif |
439 | #ifdef CONFIG_BINFMT_ELF_FDPIC | ||
440 | case PTRACE_GETFDPIC: { | ||
441 | unsigned long tmp = 0; | ||
442 | |||
443 | switch (addr) { | ||
444 | case PTRACE_GETFDPIC_EXEC: | ||
445 | tmp = child->mm->context.exec_fdpic_loadmap; | ||
446 | break; | ||
447 | case PTRACE_GETFDPIC_INTERP: | ||
448 | tmp = child->mm->context.interp_fdpic_loadmap; | ||
449 | break; | ||
450 | default: | ||
451 | break; | ||
452 | } | ||
453 | |||
454 | ret = 0; | ||
455 | if (put_user(tmp, datap)) { | ||
456 | ret = -EFAULT; | ||
457 | break; | ||
458 | } | ||
459 | break; | ||
460 | } | ||
461 | #endif | ||
462 | default: | 439 | default: |
463 | ret = ptrace_request(child, request, addr, data); | 440 | ret = ptrace_request(child, request, addr, data); |
464 | break; | 441 | break; |