diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:39:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:39:38 -0500 |
commit | 86f6f9b64a730844f1438cbedfacd6fb0170a7f7 (patch) | |
tree | cd80f8610b444ae3bd2ebfc136c2c3299a52bd9b /include | |
parent | d33a6291c1c577ff2272edab7416a0f7308e1cef (diff) | |
parent | 8b6f08eaef16dfcfebc32fa9a017bf70336ad9ec (diff) |
Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (31 commits)
sh: Add support for AP-SH4AD-0A board.
sh: Add support for AP-SH4A-3A board.
sh: Add a new mach type for alpha project boards.
serial: sh-sci: build fixes.
sh: sh7372 SH4AL-DSP probe support
sh: sh7366 Enable SDIO IRQs
sh: sh7343 Enable SDIO IRQs
sh: mach-ecovec24: enable runtime PM for SDHI
sh: sh7723 / ap325rxa enable SDIO IRQs
sh: sh7722 Enable SDIO IRQs
sh: sh7724 Enable SDIO IRQs
sh: Fix up legacy PTEA space attribute mapping.
sh: Stub out legacy PCC pgprot encoding for X2 TLBs.
sh: constify prefetch pointers.
sh: Add a machvec callback for early memblock reservations.
sh: update sh7757lcr_defconfig
sh: add PVR probing for SH7757 3rd cut
sh: Use device_initcall() instead of __initcall()
sh: intc - convert board specific landisk code
sh: Move init_landisk_IRQ to header file
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/sh_mmcif.h | 37 | ||||
-rw-r--r-- | include/linux/serial_sci.h | 22 |
2 files changed, 36 insertions, 23 deletions
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 44fc5348fd5d..bf173502d744 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -104,6 +104,9 @@ static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | |||
104 | 104 | ||
105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
106 | 106 | ||
107 | enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, | ||
108 | MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; | ||
109 | |||
107 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, | 110 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, |
108 | unsigned long cmd, unsigned long arg) | 111 | unsigned long cmd, unsigned long arg) |
109 | { | 112 | { |
@@ -166,6 +169,17 @@ static inline int sh_mmcif_boot_do_read(void __iomem *base, | |||
166 | unsigned long k; | 169 | unsigned long k; |
167 | int ret = 0; | 170 | int ret = 0; |
168 | 171 | ||
172 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ | ||
173 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, | ||
174 | CLK_ENABLE | CLKDIV_4 | SRSPTO_256 | | ||
175 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
176 | |||
177 | /* CMD9 - Get CSD */ | ||
178 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); | ||
179 | |||
180 | /* CMD7 - Select the card */ | ||
181 | sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000); | ||
182 | |||
169 | /* CMD16 - Set the block size */ | 183 | /* CMD16 - Set the block size */ |
170 | sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS); | 184 | sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS); |
171 | 185 | ||
@@ -209,27 +223,4 @@ static inline void sh_mmcif_boot_init(void __iomem *base) | |||
209 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); | 223 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); |
210 | } | 224 | } |
211 | 225 | ||
212 | static inline void sh_mmcif_boot_slurp(void __iomem *base, | ||
213 | unsigned char *buf, | ||
214 | unsigned long no_bytes) | ||
215 | { | ||
216 | unsigned long tmp; | ||
217 | |||
218 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ | ||
219 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, | ||
220 | CLK_ENABLE | CLKDIV_4 | SRSPTO_256 | | ||
221 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
222 | |||
223 | /* CMD9 - Get CSD */ | ||
224 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); | ||
225 | |||
226 | /* CMD7 - Select the card */ | ||
227 | sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000); | ||
228 | |||
229 | tmp = no_bytes / SH_MMCIF_BBS; | ||
230 | tmp += (no_bytes % SH_MMCIF_BBS) ? 1 : 0; | ||
231 | |||
232 | sh_mmcif_boot_do_read(base, 512, tmp, buf); | ||
233 | } | ||
234 | |||
235 | #endif /* __SH_MMCIF_H__ */ | 226 | #endif /* __SH_MMCIF_H__ */ |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index baed2122c5a6..1630d9cae22a 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -8,6 +8,23 @@ | |||
8 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) | 8 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | enum { | ||
12 | SCBRR_ALGO_1, /* ((clk + 16 * bps) / (16 * bps) - 1) */ | ||
13 | SCBRR_ALGO_2, /* ((clk + 16 * bps) / (32 * bps) - 1) */ | ||
14 | SCBRR_ALGO_3, /* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */ | ||
15 | SCBRR_ALGO_4, /* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */ | ||
16 | SCBRR_ALGO_5, /* (((clk * 1000 / 32) / bps) - 1) */ | ||
17 | }; | ||
18 | |||
19 | #define SCSCR_TIE (1 << 7) | ||
20 | #define SCSCR_RIE (1 << 6) | ||
21 | #define SCSCR_TE (1 << 5) | ||
22 | #define SCSCR_RE (1 << 4) | ||
23 | #define SCSCR_REIE (1 << 3) /* not supported by all parts */ | ||
24 | #define SCSCR_TOIE (1 << 2) /* not supported by all parts */ | ||
25 | #define SCSCR_CKE1 (1 << 1) | ||
26 | #define SCSCR_CKE0 (1 << 0) | ||
27 | |||
11 | /* Offsets into the sci_port->irqs array */ | 28 | /* Offsets into the sci_port->irqs array */ |
12 | enum { | 29 | enum { |
13 | SCIx_ERI_IRQ, | 30 | SCIx_ERI_IRQ, |
@@ -29,7 +46,12 @@ struct plat_sci_port { | |||
29 | unsigned int type; /* SCI / SCIF / IRDA */ | 46 | unsigned int type; /* SCI / SCIF / IRDA */ |
30 | upf_t flags; /* UPF_* flags */ | 47 | upf_t flags; /* UPF_* flags */ |
31 | char *clk; /* clock string */ | 48 | char *clk; /* clock string */ |
49 | |||
50 | unsigned int scbrr_algo_id; /* SCBRR calculation algo */ | ||
51 | unsigned int scscr; /* SCSCR initialization */ | ||
52 | |||
32 | struct device *dma_dev; | 53 | struct device *dma_dev; |
54 | |||
33 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 55 | #ifdef CONFIG_SERIAL_SH_SCI_DMA |
34 | unsigned int dma_slave_tx; | 56 | unsigned int dma_slave_tx; |
35 | unsigned int dma_slave_rx; | 57 | unsigned int dma_slave_rx; |