aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 13:08:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 13:08:43 -0400
commit54cebc68c81eacac41a21bdfe99dc889d3882c60 (patch)
treeda1d3872c6ddf208768e784bd1ea09054a81462d /arch/blackfin/mach-bf537
parentfffdedef691a0f6fa7ca1fc0a2a508cbb49def69 (diff)
parent71de1f8a6365ea65346881e526132563d93696d1 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (60 commits) Blackfin arch: make sure we include the fix for SPORT hysteresis when reprogramming clocks Blackfin arch: Fix bogus str_ident check in gpio code Blackfin arch: AD7879 Touchscreen driver Blackfin arch: introducing bfin_addr_dcachable Blackfin arch: fix a typo in comments Blackfin arch: Remove useless head file Blackfin arch: make sure L2 start and length are always defined (fixes building on BF542) Blackfin arch: use the Blackfin on-chip ROM to do software reset when possible Blackfin arch: update anomaly headers to match the latest sheet Blackfin arch: bfin_reset() is an internal reboot function ... everyone should go through machine_restart() Blackfin arch: print out error/warning if you are running on the incorrect CPU type Blackfin arch: remove non-bf54x ifdef logic since this file is only compiled on bf54x parts Blackfin arch: update board defconfigs Blackfin arch: Add optional verbose debug Blackfin arch: emulate a TTY over the EMUDAT/JTAG interface Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1) Blackfin arch: ptrace - fix off-by-one check on end of memory regions Blackfin arch: Enable framebuffer support for the BF526-EZkit TFT LCD display Blackfin arch: flash memory map and dm9000 resources updating Blackfin arch: early prink code still use uart core console functions to parse and set configure option string ...
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c85
-rw-r--r--arch/blackfin/mach-bf537/head.S3
-rw-r--r--arch/blackfin/mach-bf537/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf537/include/mach/bf537.h12
4 files changed, 94 insertions, 8 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 8482d22321f3..dc5a30849c15 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -51,7 +51,6 @@
51#include <asm/reboot.h> 51#include <asm/reboot.h>
52#include <asm/portmux.h> 52#include <asm/portmux.h>
53#include <asm/dpmc.h> 53#include <asm/dpmc.h>
54#include <linux/spi/ad7877.h>
55 54
56/* 55/*
57 * Name the Board for the /proc/cpuinfo 56 * Name the Board for the /proc/cpuinfo
@@ -555,6 +554,7 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
555#endif 554#endif
556 555
557#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 556#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
557#include <linux/spi/ad7877.h>
558static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 558static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
559 .enable_dma = 0, 559 .enable_dma = 0,
560 .bits_per_word = 16, 560 .bits_per_word = 16,
@@ -575,6 +575,28 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
575}; 575};
576#endif 576#endif
577 577
578#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
579#include <linux/spi/ad7879.h>
580static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
581 .enable_dma = 0,
582 .bits_per_word = 16,
583};
584
585static const struct ad7879_platform_data bfin_ad7879_ts_info = {
586 .model = 7879, /* Model = AD7879 */
587 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
588 .pressure_max = 10000,
589 .pressure_min = 0,
590 .first_conversion_delay = 3, /* wait 512us before do a first conversion */
591 .acquisition_time = 1, /* 4us acquisition time per sample */
592 .median = 2, /* do 8 measurements */
593 .averaging = 1, /* take the average of 4 middle samples */
594 .pen_down_acc_interval = 255, /* 9.4 ms */
595 .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */
596 .gpio_default = 1, /* During initialization set GPIO = HIGH */
597};
598#endif
599
578#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 600#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
579static struct bfin5xx_spi_chip spidev_chip_info = { 601static struct bfin5xx_spi_chip spidev_chip_info = {
580 .enable_dma = 0, 602 .enable_dma = 0,
@@ -582,6 +604,13 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
582}; 604};
583#endif 605#endif
584 606
607#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
608static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
609 .enable_dma = 0,
610 .bits_per_word = 8,
611};
612#endif
613
585#if defined(CONFIG_MTD_DATAFLASH) \ 614#if defined(CONFIG_MTD_DATAFLASH) \
586 || defined(CONFIG_MTD_DATAFLASH_MODULE) 615 || defined(CONFIG_MTD_DATAFLASH_MODULE)
587 616
@@ -721,6 +750,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
721 .controller_data = &spi_ad7877_chip_info, 750 .controller_data = &spi_ad7877_chip_info,
722 }, 751 },
723#endif 752#endif
753#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
754 {
755 .modalias = "ad7879",
756 .platform_data = &bfin_ad7879_ts_info,
757 .irq = IRQ_PF7,
758 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
759 .bus_num = 0,
760 .chip_select = 1,
761 .controller_data = &spi_ad7879_chip_info,
762 .mode = SPI_CPHA | SPI_CPOL,
763 },
764#endif
724#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 765#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
725 { 766 {
726 .modalias = "spidev", 767 .modalias = "spidev",
@@ -730,6 +771,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
730 .controller_data = &spidev_chip_info, 771 .controller_data = &spidev_chip_info,
731 }, 772 },
732#endif 773#endif
774#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
775 {
776 .modalias = "bfin-lq035q1-spi",
777 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
778 .bus_num = 0,
779 .chip_select = 2,
780 .controller_data = &lq035q1_spi_chip_info,
781 .mode = SPI_CPHA | SPI_CPOL,
782 },
783#endif
733}; 784};
734 785
735#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 786#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
@@ -777,6 +828,34 @@ static struct platform_device bfin_fb_adv7393_device = {
777}; 828};
778#endif 829#endif
779 830
831#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
832#include <asm/bfin-lq035q1.h>
833
834static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
835 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
836 .use_bl = 0, /* let something else control the LCD Blacklight */
837 .gpio_bl = GPIO_PF7,
838};
839
840static struct resource bfin_lq035q1_resources[] = {
841 {
842 .start = IRQ_PPI_ERROR,
843 .end = IRQ_PPI_ERROR,
844 .flags = IORESOURCE_IRQ,
845 },
846};
847
848static struct platform_device bfin_lq035q1_device = {
849 .name = "bfin-lq035q1",
850 .id = -1,
851 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
852 .resource = bfin_lq035q1_resources,
853 .dev = {
854 .platform_data = &bfin_lq035q1_data,
855 },
856};
857#endif
858
780#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 859#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
781static struct resource bfin_uart_resources[] = { 860static struct resource bfin_uart_resources[] = {
782#ifdef CONFIG_SERIAL_BFIN_UART0 861#ifdef CONFIG_SERIAL_BFIN_UART0
@@ -997,6 +1076,10 @@ static struct platform_device *stamp_devices[] __initdata = {
997 &bfin_fb_device, 1076 &bfin_fb_device,
998#endif 1077#endif
999 1078
1079#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1080 &bfin_lq035q1_device,
1081#endif
1082
1000#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 1083#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
1001 &bfin_fb_adv7393_device, 1084 &bfin_fb_adv7393_device,
1002#endif 1085#endif
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S
index 12eb5cc571d0..559a7eef7a38 100644
--- a/arch/blackfin/mach-bf537/head.S
+++ b/arch/blackfin/mach-bf537/head.S
@@ -87,6 +87,9 @@ ENTRY(_start_dma_code)
87 r1 = PLL_BYPASS; /* Bypass the PLL? */ 87 r1 = PLL_BYPASS; /* Bypass the PLL? */
88 r1 = r1 << 8; /* Shift it over */ 88 r1 = r1 << 8; /* Shift it over */
89 r0 = r1 | r0; /* add them all together */ 89 r0 = r1 | r0; /* add them all together */
90#ifdef ANOMALY_05000265
91 r0 = BITSET(r0, 15); /* Add 250 mV of hysteresis to SPORT input pins */
92#endif
90 93
91 p0.h = hi(PLL_CTL); 94 p0.h = hi(PLL_CTL);
92 p0.l = lo(PLL_CTL); /* Load the address */ 95 p0.l = lo(PLL_CTL); /* Load the address */
diff --git a/arch/blackfin/mach-bf537/include/mach/anomaly.h b/arch/blackfin/mach-bf537/include/mach/anomaly.h
index 8460ab9c324f..c68992494f9e 100644
--- a/arch/blackfin/mach-bf537/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf537/include/mach/anomaly.h
@@ -158,6 +158,8 @@
158#define ANOMALY_05000266 (0) 158#define ANOMALY_05000266 (0)
159#define ANOMALY_05000311 (0) 159#define ANOMALY_05000311 (0)
160#define ANOMALY_05000323 (0) 160#define ANOMALY_05000323 (0)
161#define ANOMALY_05000353 (1)
161#define ANOMALY_05000363 (0) 162#define ANOMALY_05000363 (0)
163#define ANOMALY_05000386 (1)
162 164
163#endif 165#endif
diff --git a/arch/blackfin/mach-bf537/include/mach/bf537.h b/arch/blackfin/mach-bf537/include/mach/bf537.h
index cfe2a221112e..24d5c9d42323 100644
--- a/arch/blackfin/mach-bf537/include/mach/bf537.h
+++ b/arch/blackfin/mach-bf537/include/mach/bf537.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF537_H__ 30#ifndef __MACH_BF537_H__
31#define __MACH_BF537_H__ 31#define __MACH_BF537_H__
32 32
33#define SUPPORTED_REVID 2
34
35/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */ 33/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
36 34
37#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */ 35#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */
@@ -123,19 +121,19 @@
123 121
124#ifdef CONFIG_BF537 122#ifdef CONFIG_BF537
125#define CPU "BF537" 123#define CPU "BF537"
126#define CPUID 0x027c8000 124#define CPUID 0x27c8
127#endif 125#endif
128#ifdef CONFIG_BF536 126#ifdef CONFIG_BF536
129#define CPU "BF536" 127#define CPU "BF536"
130#define CPUID 0x027c8000 128#define CPUID 0x27c8
131#endif 129#endif
132#ifdef CONFIG_BF534 130#ifdef CONFIG_BF534
133#define CPU "BF534" 131#define CPU "BF534"
134#define CPUID 0x027c6000 132#define CPUID 0x27c6
135#endif 133#endif
134
136#ifndef CPU 135#ifndef CPU
137#define CPU "UNKNOWN" 136#error Unknown CPU type - This kernel doesn't seem to be configured properly
138#define CPUID 0x0
139#endif 137#endif
140 138
141#endif /* __MACH_BF537_H__ */ 139#endif /* __MACH_BF537_H__ */