aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 10:21:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 10:21:16 -0400
commitf5b8fcb48b9eb1a02f6a3a679da913f6c467527c (patch)
tree4e67c46f5ebc0acf8c29ce01c711b84352a617f3 /arch/blackfin/include
parenta1f0bcccffe508b36f8eb0bd39771d4bedc683a8 (diff)
parent5ae89ee043ce96e3790e6c75f3807c8e37d98634 (diff)
Merge tag 'for-linus' of git://github.com/realmz/blackfin-linux
Pull blackfin updates from Steven Miao. * tag 'for-linus' of git://github.com/realmz/blackfin-linux: bfin cache: dcplb map: add 16M dcplb map for BF60x blackfin: smp: fix smp build after drop asm/system.h blackfin: fix bootup core clock and system clock display Platform Nand: Set the GPIO for NAND read as input blackfin: rename vmImage to uImage after we move to buildroot blackfin: twi: Remove bogus #endif bf609: rsi: Add bf609 rsi MMR macro and board platform data. blackfin: dmc: Improve DDR2 write through in DMC effict controller.
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r--arch/blackfin/include/asm/atomic.h2
-rw-r--r--arch/blackfin/include/asm/bfin_sdh.h31
-rw-r--r--arch/blackfin/include/asm/bitops.h1
-rw-r--r--arch/blackfin/include/asm/def_LPBlackfin.h2
-rw-r--r--arch/blackfin/include/asm/mem_init.h9
5 files changed, 43 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h
index c8db653c72d2..a107a98e9978 100644
--- a/arch/blackfin/include/asm/atomic.h
+++ b/arch/blackfin/include/asm/atomic.h
@@ -11,7 +11,9 @@
11 11
12#ifdef CONFIG_SMP 12#ifdef CONFIG_SMP
13 13
14#include <asm/barrier.h>
14#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/types.h>
15 17
16asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); 18asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr);
17asmlinkage int __raw_atomic_update_asm(volatile int *ptr, int value); 19asmlinkage int __raw_atomic_update_asm(volatile int *ptr, int value);
diff --git a/arch/blackfin/include/asm/bfin_sdh.h b/arch/blackfin/include/asm/bfin_sdh.h
index 6a4cfe2d3367..a99957ea9e9b 100644
--- a/arch/blackfin/include/asm/bfin_sdh.h
+++ b/arch/blackfin/include/asm/bfin_sdh.h
@@ -24,18 +24,27 @@ struct bfin_sd_host {
24#define CMD_INT_E (1 << 8) /* Command Interrupt */ 24#define CMD_INT_E (1 << 8) /* Command Interrupt */
25#define CMD_PEND_E (1 << 9) /* Command Pending */ 25#define CMD_PEND_E (1 << 9) /* Command Pending */
26#define CMD_E (1 << 10) /* Command Enable */ 26#define CMD_E (1 << 10) /* Command Enable */
27#ifdef RSI_BLKSZ
28#define CMD_CRC_CHECK_D (1 << 11) /* CRC Check is disabled */
29#define CMD_DATA0_BUSY (1 << 12) /* Check for Busy State on the DATA0 pin */
30#endif
27 31
28/* SDH_PWR_CTL bitmasks */ 32/* SDH_PWR_CTL bitmasks */
33#ifndef RSI_BLKSZ
29#define PWR_ON 0x3 /* Power On */ 34#define PWR_ON 0x3 /* Power On */
30#define SD_CMD_OD (1 << 6) /* Open Drain Output */ 35#define SD_CMD_OD (1 << 6) /* Open Drain Output */
31#define ROD_CTL (1 << 7) /* Rod Control */ 36#define ROD_CTL (1 << 7) /* Rod Control */
37#endif
32 38
33/* SDH_CLK_CTL bitmasks */ 39/* SDH_CLK_CTL bitmasks */
34#define CLKDIV 0xff /* MC_CLK Divisor */ 40#define CLKDIV 0xff /* MC_CLK Divisor */
35#define CLK_E (1 << 8) /* MC_CLK Bus Clock Enable */ 41#define CLK_E (1 << 8) /* MC_CLK Bus Clock Enable */
36#define PWR_SV_E (1 << 9) /* Power Save Enable */ 42#define PWR_SV_E (1 << 9) /* Power Save Enable */
37#define CLKDIV_BYPASS (1 << 10) /* Bypass Divisor */ 43#define CLKDIV_BYPASS (1 << 10) /* Bypass Divisor */
38#define WIDE_BUS (1 << 11) /* Wide Bus Mode Enable */ 44#define BUS_MODE_MASK 0x1800 /* Bus Mode Mask */
45#define STD_BUS_1 0x000 /* Standard Bus 1 bit mode */
46#define WIDE_BUS_4 0x800 /* Wide Bus 4 bit mode */
47#define BYTE_BUS_8 0x1000 /* Byte Bus 8 bit mode */
39 48
40/* SDH_RESP_CMD bitmasks */ 49/* SDH_RESP_CMD bitmasks */
41#define RESP_CMD 0x3f /* Response Command */ 50#define RESP_CMD 0x3f /* Response Command */
@@ -45,7 +54,13 @@ struct bfin_sd_host {
45#define DTX_DIR (1 << 1) /* Data Transfer Direction */ 54#define DTX_DIR (1 << 1) /* Data Transfer Direction */
46#define DTX_MODE (1 << 2) /* Data Transfer Mode */ 55#define DTX_MODE (1 << 2) /* Data Transfer Mode */
47#define DTX_DMA_E (1 << 3) /* Data Transfer DMA Enable */ 56#define DTX_DMA_E (1 << 3) /* Data Transfer DMA Enable */
57#ifndef RSI_BLKSZ
48#define DTX_BLK_LGTH (0xf << 4) /* Data Transfer Block Length */ 58#define DTX_BLK_LGTH (0xf << 4) /* Data Transfer Block Length */
59#else
60
61/* Bit masks for SDH_BLK_SIZE */
62#define DTX_BLK_LGTH 0x1fff /* Data Transfer Block Length */
63#endif
49 64
50/* SDH_STATUS bitmasks */ 65/* SDH_STATUS bitmasks */
51#define CMD_CRC_FAIL (1 << 0) /* CMD CRC Fail */ 66#define CMD_CRC_FAIL (1 << 0) /* CMD CRC Fail */
@@ -114,10 +129,14 @@ struct bfin_sd_host {
114/* SDH_E_STATUS bitmasks */ 129/* SDH_E_STATUS bitmasks */
115#define SDIO_INT_DET (1 << 1) /* SDIO Int Detected */ 130#define SDIO_INT_DET (1 << 1) /* SDIO Int Detected */
116#define SD_CARD_DET (1 << 4) /* SD Card Detect */ 131#define SD_CARD_DET (1 << 4) /* SD Card Detect */
132#define SD_CARD_BUSYMODE (1 << 31) /* Card is in Busy mode */
133#define SD_CARD_SLPMODE (1 << 30) /* Card in Sleep Mode */
134#define SD_CARD_READY (1 << 17) /* Card Ready */
117 135
118/* SDH_E_MASK bitmasks */ 136/* SDH_E_MASK bitmasks */
119#define SDIO_MSK (1 << 1) /* Mask SDIO Int Detected */ 137#define SDIO_MSK (1 << 1) /* Mask SDIO Int Detected */
120#define SCD_MSK (1 << 6) /* Mask Card Detect */ 138#define SCD_MSK (1 << 4) /* Mask Card Detect */
139#define CARD_READY_MSK (1 << 16) /* Mask Card Ready */
121 140
122/* SDH_CFG bitmasks */ 141/* SDH_CFG bitmasks */
123#define CLKS_EN (1 << 0) /* Clocks Enable */ 142#define CLKS_EN (1 << 0) /* Clocks Enable */
@@ -126,7 +145,15 @@ struct bfin_sd_host {
126#define SD_RST (1 << 4) /* SDMMC Reset */ 145#define SD_RST (1 << 4) /* SDMMC Reset */
127#define PUP_SDDAT (1 << 5) /* Pull-up SD_DAT */ 146#define PUP_SDDAT (1 << 5) /* Pull-up SD_DAT */
128#define PUP_SDDAT3 (1 << 6) /* Pull-up SD_DAT3 */ 147#define PUP_SDDAT3 (1 << 6) /* Pull-up SD_DAT3 */
148#ifndef RSI_BLKSZ
129#define PD_SDDAT3 (1 << 7) /* Pull-down SD_DAT3 */ 149#define PD_SDDAT3 (1 << 7) /* Pull-down SD_DAT3 */
150#else
151#define PWR_ON 0x600 /* Power On */
152#define SD_CMD_OD (1 << 11) /* Open Drain Output */
153#define BOOT_EN (1 << 12) /* Boot Enable */
154#define BOOT_MODE (1 << 13) /* Alternate Boot Mode */
155#define BOOT_ACK_EN (1 << 14) /* Boot ACK is expected */
156#endif
130 157
131/* SDH_RD_WAIT_EN bitmasks */ 158/* SDH_RD_WAIT_EN bitmasks */
132#define RWR (1 << 0) /* Read Wait Request */ 159#define RWR (1 << 0) /* Read Wait Request */
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
index 8a0fed16058f..0ca40dd44724 100644
--- a/arch/blackfin/include/asm/bitops.h
+++ b/arch/blackfin/include/asm/bitops.h
@@ -41,6 +41,7 @@
41#include <asm-generic/bitops/non-atomic.h> 41#include <asm-generic/bitops/non-atomic.h>
42#else 42#else
43 43
44#include <asm/barrier.h>
44#include <asm/byteorder.h> /* swab32 */ 45#include <asm/byteorder.h> /* swab32 */
45#include <linux/linkage.h> 46#include <linux/linkage.h>
46 47
diff --git a/arch/blackfin/include/asm/def_LPBlackfin.h b/arch/blackfin/include/asm/def_LPBlackfin.h
index fe0ca03a1cb2..ca67145c6a45 100644
--- a/arch/blackfin/include/asm/def_LPBlackfin.h
+++ b/arch/blackfin/include/asm/def_LPBlackfin.h
@@ -622,10 +622,12 @@ do { \
622#define PAGE_SIZE_4KB 0x00010000 /* 4 KB page size */ 622#define PAGE_SIZE_4KB 0x00010000 /* 4 KB page size */
623#define PAGE_SIZE_1MB 0x00020000 /* 1 MB page size */ 623#define PAGE_SIZE_1MB 0x00020000 /* 1 MB page size */
624#define PAGE_SIZE_4MB 0x00030000 /* 4 MB page size */ 624#define PAGE_SIZE_4MB 0x00030000 /* 4 MB page size */
625#ifdef CONFIG_BF60x
625#define PAGE_SIZE_16KB 0x00040000 /* 16 KB page size */ 626#define PAGE_SIZE_16KB 0x00040000 /* 16 KB page size */
626#define PAGE_SIZE_64KB 0x00050000 /* 64 KB page size */ 627#define PAGE_SIZE_64KB 0x00050000 /* 64 KB page size */
627#define PAGE_SIZE_16MB 0x00060000 /* 16 MB page size */ 628#define PAGE_SIZE_16MB 0x00060000 /* 16 MB page size */
628#define PAGE_SIZE_64MB 0x00070000 /* 64 MB page size */ 629#define PAGE_SIZE_64MB 0x00070000 /* 64 MB page size */
630#endif
629#define CPLB_L1SRAM 0x00000020 /* 0=SRAM mapped in L1, 0=SRAM not 631#define CPLB_L1SRAM 0x00000020 /* 0=SRAM mapped in L1, 0=SRAM not
630 * mapped to L1 632 * mapped to L1
631 */ 633 */
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h
index 9b33e7247864..c865b33eeb68 100644
--- a/arch/blackfin/include/asm/mem_init.h
+++ b/arch/blackfin/include/asm/mem_init.h
@@ -335,6 +335,7 @@
335struct ddr_config { 335struct ddr_config {
336 u32 ddr_clk; 336 u32 ddr_clk;
337 u32 dmc_ddrctl; 337 u32 dmc_ddrctl;
338 u32 dmc_effctl;
338 u32 dmc_ddrcfg; 339 u32 dmc_ddrcfg;
339 u32 dmc_ddrtr0; 340 u32 dmc_ddrtr0;
340 u32 dmc_ddrtr1; 341 u32 dmc_ddrtr1;
@@ -348,6 +349,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
348 [0] = { 349 [0] = {
349 .ddr_clk = 125, 350 .ddr_clk = 125,
350 .dmc_ddrctl = 0x00000904, 351 .dmc_ddrctl = 0x00000904,
352 .dmc_effctl = 0x004400C0,
351 .dmc_ddrcfg = 0x00000422, 353 .dmc_ddrcfg = 0x00000422,
352 .dmc_ddrtr0 = 0x20705212, 354 .dmc_ddrtr0 = 0x20705212,
353 .dmc_ddrtr1 = 0x201003CF, 355 .dmc_ddrtr1 = 0x201003CF,
@@ -358,6 +360,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
358 [1] = { 360 [1] = {
359 .ddr_clk = 133, 361 .ddr_clk = 133,
360 .dmc_ddrctl = 0x00000904, 362 .dmc_ddrctl = 0x00000904,
363 .dmc_effctl = 0x004400C0,
361 .dmc_ddrcfg = 0x00000422, 364 .dmc_ddrcfg = 0x00000422,
362 .dmc_ddrtr0 = 0x20806313, 365 .dmc_ddrtr0 = 0x20806313,
363 .dmc_ddrtr1 = 0x2013040D, 366 .dmc_ddrtr1 = 0x2013040D,
@@ -368,6 +371,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
368 [2] = { 371 [2] = {
369 .ddr_clk = 150, 372 .ddr_clk = 150,
370 .dmc_ddrctl = 0x00000904, 373 .dmc_ddrctl = 0x00000904,
374 .dmc_effctl = 0x004400C0,
371 .dmc_ddrcfg = 0x00000422, 375 .dmc_ddrcfg = 0x00000422,
372 .dmc_ddrtr0 = 0x20A07323, 376 .dmc_ddrtr0 = 0x20A07323,
373 .dmc_ddrtr1 = 0x20160492, 377 .dmc_ddrtr1 = 0x20160492,
@@ -378,6 +382,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
378 [3] = { 382 [3] = {
379 .ddr_clk = 166, 383 .ddr_clk = 166,
380 .dmc_ddrctl = 0x00000904, 384 .dmc_ddrctl = 0x00000904,
385 .dmc_effctl = 0x004400C0,
381 .dmc_ddrcfg = 0x00000422, 386 .dmc_ddrcfg = 0x00000422,
382 .dmc_ddrtr0 = 0x20A07323, 387 .dmc_ddrtr0 = 0x20A07323,
383 .dmc_ddrtr1 = 0x2016050E, 388 .dmc_ddrtr1 = 0x2016050E,
@@ -388,6 +393,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
388 [4] = { 393 [4] = {
389 .ddr_clk = 200, 394 .ddr_clk = 200,
390 .dmc_ddrctl = 0x00000904, 395 .dmc_ddrctl = 0x00000904,
396 .dmc_effctl = 0x004400C0,
391 .dmc_ddrcfg = 0x00000422, 397 .dmc_ddrcfg = 0x00000422,
392 .dmc_ddrtr0 = 0x20a07323, 398 .dmc_ddrtr0 = 0x20a07323,
393 .dmc_ddrtr1 = 0x2016050f, 399 .dmc_ddrtr1 = 0x2016050f,
@@ -398,6 +404,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
398 [5] = { 404 [5] = {
399 .ddr_clk = 225, 405 .ddr_clk = 225,
400 .dmc_ddrctl = 0x00000904, 406 .dmc_ddrctl = 0x00000904,
407 .dmc_effctl = 0x004400C0,
401 .dmc_ddrcfg = 0x00000422, 408 .dmc_ddrcfg = 0x00000422,
402 .dmc_ddrtr0 = 0x20E0A424, 409 .dmc_ddrtr0 = 0x20E0A424,
403 .dmc_ddrtr1 = 0x302006DB, 410 .dmc_ddrtr1 = 0x302006DB,
@@ -408,6 +415,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1")))
408 [6] = { 415 [6] = {
409 .ddr_clk = 250, 416 .ddr_clk = 250,
410 .dmc_ddrctl = 0x00000904, 417 .dmc_ddrctl = 0x00000904,
418 .dmc_effctl = 0x004400C0,
411 .dmc_ddrcfg = 0x00000422, 419 .dmc_ddrcfg = 0x00000422,
412 .dmc_ddrtr0 = 0x20E0A424, 420 .dmc_ddrtr0 = 0x20E0A424,
413 .dmc_ddrtr1 = 0x3020079E, 421 .dmc_ddrtr1 = 0x3020079E,
@@ -469,6 +477,7 @@ static inline void init_dmc(u32 dmc_clk)
469 bfin_write_DMC0_TR2(ddr_config_table[i].dmc_ddrtr2); 477 bfin_write_DMC0_TR2(ddr_config_table[i].dmc_ddrtr2);
470 bfin_write_DMC0_MR(ddr_config_table[i].dmc_ddrmr); 478 bfin_write_DMC0_MR(ddr_config_table[i].dmc_ddrmr);
471 bfin_write_DMC0_EMR1(ddr_config_table[i].dmc_ddrmr1); 479 bfin_write_DMC0_EMR1(ddr_config_table[i].dmc_ddrmr1);
480 bfin_write_DMC0_EFFCTL(ddr_config_table[i].dmc_effctl);
472 bfin_write_DMC0_CTL(ddr_config_table[i].dmc_ddrctl); 481 bfin_write_DMC0_CTL(ddr_config_table[i].dmc_ddrctl);
473 break; 482 break;
474 } 483 }