diff options
Diffstat (limited to 'arch/arm/mach-shmobile')
| -rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/clock-sh7367.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/clock-sh7377.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | 87 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot.h | 20 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot_macros.h | 65 |
8 files changed, 179 insertions, 6 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 51dcd59eda6a..632933357242 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
| @@ -6,7 +6,7 @@ config ARCH_SH7367 | |||
| 6 | bool "SH-Mobile G3 (SH7367)" | 6 | bool "SH-Mobile G3 (SH7367)" |
| 7 | select CPU_V6 | 7 | select CPU_V6 |
| 8 | select HAVE_CLK | 8 | select HAVE_CLK |
| 9 | select COMMON_CLKDEV | 9 | select CLKDEV_LOOKUP |
| 10 | select SH_CLK_CPG | 10 | select SH_CLK_CPG |
| 11 | select GENERIC_CLOCKEVENTS | 11 | select GENERIC_CLOCKEVENTS |
| 12 | 12 | ||
| @@ -14,7 +14,7 @@ config ARCH_SH7377 | |||
| 14 | bool "SH-Mobile G4 (SH7377)" | 14 | bool "SH-Mobile G4 (SH7377)" |
| 15 | select CPU_V7 | 15 | select CPU_V7 |
| 16 | select HAVE_CLK | 16 | select HAVE_CLK |
| 17 | select COMMON_CLKDEV | 17 | select CLKDEV_LOOKUP |
| 18 | select SH_CLK_CPG | 18 | select SH_CLK_CPG |
| 19 | select GENERIC_CLOCKEVENTS | 19 | select GENERIC_CLOCKEVENTS |
| 20 | 20 | ||
| @@ -22,7 +22,7 @@ config ARCH_SH7372 | |||
| 22 | bool "SH-Mobile AP4 (SH7372)" | 22 | bool "SH-Mobile AP4 (SH7372)" |
| 23 | select CPU_V7 | 23 | select CPU_V7 |
| 24 | select HAVE_CLK | 24 | select HAVE_CLK |
| 25 | select COMMON_CLKDEV | 25 | select CLKDEV_LOOKUP |
| 26 | select SH_CLK_CPG | 26 | select SH_CLK_CPG |
| 27 | select GENERIC_CLOCKEVENTS | 27 | select GENERIC_CLOCKEVENTS |
| 28 | 28 | ||
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index b1222dc43380..f92dbd0c06d5 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #include <asm/mach/arch.h> | 61 | #include <asm/mach/arch.h> |
| 62 | #include <asm/mach/map.h> | 62 | #include <asm/mach/map.h> |
| 63 | #include <asm/mach/time.h> | 63 | #include <asm/mach/time.h> |
| 64 | #include <asm/setup.h> | ||
| 64 | 65 | ||
| 65 | /* | 66 | /* |
| 66 | * Address Interface BusWidth note | 67 | * Address Interface BusWidth note |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c index 9f78729098f2..6b186aefcbd6 100644 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ b/arch/arm/mach-shmobile/clock-sh7367.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
| 23 | #include <linux/clkdev.h> | ||
| 23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
| 24 | #include <asm/clkdev.h> | ||
| 25 | 25 | ||
| 26 | /* SH7367 registers */ | 26 | /* SH7367 registers */ |
| 27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 66663adb21f8..9aa8d68d1a9c 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
| 23 | #include <linux/clkdev.h> | ||
| 23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
| 24 | #include <asm/clkdev.h> | ||
| 25 | 25 | ||
| 26 | /* SH7372 registers */ | 26 | /* SH7372 registers */ |
| 27 | #define FRQCRA 0xe6150000 | 27 | #define FRQCRA 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c index f91395aeb9ab..95942466e63f 100644 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ b/arch/arm/mach-shmobile/clock-sh7377.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
| 23 | #include <linux/clkdev.h> | ||
| 23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
| 24 | #include <asm/clkdev.h> | ||
| 25 | 25 | ||
| 26 | /* SH7377 registers */ | 26 | /* SH7377 registers */ |
| 27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt new file mode 100644 index 000000000000..e3ebfa73956e --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | LIST "partner-jet-setup.txt" | ||
| 2 | LIST "(C) Copyright 2010 Renesas Solutions Corp" | ||
| 3 | LIST "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>" | ||
| 4 | |||
| 5 | LIST "RWT Setting" | ||
| 6 | EW 0xE6020004, 0xA500 | ||
| 7 | EW 0xE6030004, 0xA500 | ||
| 8 | |||
| 9 | DD 0x01001000, 0x01001000 | ||
| 10 | |||
| 11 | LIST "GPIO Setting" | ||
| 12 | EB 0xE6051013, 0xA2 | ||
| 13 | |||
| 14 | LIST "CPG" | ||
| 15 | ED 0xE6150080, 0x00000180 | ||
| 16 | ED 0xE61500C0, 0x00000002 | ||
| 17 | |||
| 18 | WAIT 1, 0xFE40009C | ||
| 19 | |||
| 20 | LIST "FRQCR" | ||
| 21 | ED 0xE6150000, 0x2D1305C3 | ||
| 22 | ED 0xE61500E0, 0x9E40358E | ||
| 23 | ED 0xE6150004, 0x80331050 | ||
| 24 | |||
| 25 | WAIT 1, 0xFE40009C | ||
| 26 | |||
| 27 | ED 0xE61500E4, 0x00002000 | ||
| 28 | |||
| 29 | WAIT 1, 0xFE40009C | ||
| 30 | |||
| 31 | LIST "PLL" | ||
| 32 | ED 0xE6150028, 0x00004000 | ||
| 33 | |||
| 34 | WAIT 1, 0xFE40009C | ||
| 35 | |||
| 36 | ED 0xE615002C, 0x93000040 | ||
| 37 | |||
| 38 | WAIT 1, 0xFE40009C | ||
| 39 | |||
| 40 | LIST "BSC" | ||
| 41 | ED 0xFEC10000, 0x00E0001B | ||
| 42 | |||
| 43 | LIST "SBSC1" | ||
| 44 | ED 0xFE400354, 0x01AD8000 | ||
| 45 | ED 0xFE400354, 0x01AD8001 | ||
| 46 | |||
| 47 | WAIT 5, 0xFE40009C | ||
| 48 | |||
| 49 | ED 0xFE400008, 0xBCC90151 | ||
| 50 | ED 0xFE400040, 0x41774113 | ||
| 51 | ED 0xFE400044, 0x2712E229 | ||
| 52 | ED 0xFE400048, 0x20C18505 | ||
| 53 | ED 0xFE40004C, 0x00110209 | ||
| 54 | ED 0xFE400010, 0x00000087 | ||
| 55 | |||
| 56 | WAIT 10, 0xFE40009C | ||
| 57 | |||
| 58 | ED 0xFE400084, 0x0000003F | ||
| 59 | EB 0xFE500000, 0x00 | ||
| 60 | |||
| 61 | WAIT 5, 0xFE40009C | ||
| 62 | |||
| 63 | ED 0xFE400084, 0x0000FF0A | ||
| 64 | EB 0xFE500000, 0x00 | ||
| 65 | |||
| 66 | WAIT 1, 0xFE40009C | ||
| 67 | |||
| 68 | ED 0xFE400084, 0x00002201 | ||
| 69 | EB 0xFE500000, 0x00 | ||
| 70 | ED 0xFE400084, 0x00000302 | ||
| 71 | EB 0xFE500000, 0x00 | ||
| 72 | EB 0xFE5C0000, 0x00 | ||
| 73 | ED 0xFE400008, 0xBCC90159 | ||
| 74 | ED 0xFE40008C, 0x88800004 | ||
| 75 | ED 0xFE400094, 0x00000004 | ||
| 76 | ED 0xFE400028, 0xA55A0032 | ||
| 77 | ED 0xFE40002C, 0xA55A000C | ||
| 78 | ED 0xFE400020, 0xA55A2048 | ||
| 79 | ED 0xFE400008, 0xBCC90959 | ||
| 80 | |||
| 81 | LIST "Change CPGA setting" | ||
| 82 | ED 0xE61500E0, 0x9E40352E | ||
| 83 | ED 0xE6150004, 0x80331050 | ||
| 84 | |||
| 85 | WAIT 1, 0xFE40009C | ||
| 86 | |||
| 87 | ED 0xE6150354, 0x00000002 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h new file mode 100644 index 000000000000..3ad86b7708e9 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef ZBOOT_H | ||
| 2 | #define ZBOOT_H | ||
| 3 | |||
| 4 | #include <asm/mach-types.h> | ||
| 5 | #include <mach/zboot_macros.h> | ||
| 6 | |||
| 7 | /************************************************** | ||
| 8 | * | ||
| 9 | * board specific settings | ||
| 10 | * | ||
| 11 | **************************************************/ | ||
| 12 | |||
| 13 | #ifdef CONFIG_MACH_AP4EVB | ||
| 14 | #define MACH_TYPE MACH_TYPE_AP4EVB | ||
| 15 | #include "mach/head-ap4evb.txt" | ||
| 16 | #else | ||
| 17 | #error "unsupported board." | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #endif /* ZBOOT_H */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h new file mode 100644 index 000000000000..aa6111fbc989 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | #ifndef __ZBOOT_MACRO_H | ||
| 2 | #define __ZBOOT_MACRO_H | ||
| 3 | |||
| 4 | /* The LIST command is used to include comments in the script */ | ||
| 5 | .macro LIST comment | ||
| 6 | .endm | ||
| 7 | |||
| 8 | /* The ED command is used to write a 32-bit word */ | ||
| 9 | .macro ED, addr, data | ||
| 10 | LDR r0, 1f | ||
| 11 | LDR r1, 2f | ||
| 12 | STR r1, [r0] | ||
| 13 | B 3f | ||
| 14 | 1 : .long \addr | ||
| 15 | 2 : .long \data | ||
| 16 | 3 : | ||
| 17 | .endm | ||
| 18 | |||
| 19 | /* The EW command is used to write a 16-bit word */ | ||
| 20 | .macro EW, addr, data | ||
| 21 | LDR r0, 1f | ||
| 22 | LDR r1, 2f | ||
| 23 | STRH r1, [r0] | ||
| 24 | B 3f | ||
| 25 | 1 : .long \addr | ||
| 26 | 2 : .long \data | ||
| 27 | 3 : | ||
| 28 | .endm | ||
| 29 | |||
| 30 | /* The EB command is used to write an 8-bit word */ | ||
| 31 | .macro EB, addr, data | ||
| 32 | LDR r0, 1f | ||
| 33 | LDR r1, 2f | ||
| 34 | STRB r1, [r0] | ||
| 35 | B 3f | ||
| 36 | 1 : .long \addr | ||
| 37 | 2 : .long \data | ||
| 38 | 3 : | ||
| 39 | .endm | ||
| 40 | |||
| 41 | /* The WAIT command is used to delay the execution */ | ||
| 42 | .macro WAIT, time, reg | ||
| 43 | LDR r1, 1f | ||
| 44 | LDR r0, 2f | ||
| 45 | STR r0, [r1] | ||
| 46 | 10 : | ||
| 47 | LDR r0, [r1] | ||
| 48 | CMP r0, #0x00000000 | ||
| 49 | BNE 10b | ||
| 50 | NOP | ||
| 51 | B 3f | ||
| 52 | 1 : .long \reg | ||
| 53 | 2 : .long \time * 100 | ||
| 54 | 3 : | ||
| 55 | .endm | ||
| 56 | |||
| 57 | /* The DD command is used to read a 32-bit word */ | ||
| 58 | .macro DD, start, end | ||
| 59 | LDR r1, 1f | ||
| 60 | B 2f | ||
| 61 | 1 : .long \start | ||
| 62 | 2 : | ||
| 63 | .endm | ||
| 64 | |||
| 65 | #endif /* __ZBOOT_MACRO_H */ | ||
