diff options
author | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-01 12:53:25 +0000 |
---|---|---|
committer | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-01 12:53:25 +0000 |
commit | 20face5dc2bfe22d6fb747c36ebfc70cad854fa4 (patch) | |
tree | e12a21f97b27b2388bba1ad2372da04f6282b241 /packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch | |
parent | 1c9196a130c2a4f78e89a871deebb3cd9ac60cc8 (diff) |
u-boot-1.1.4: Added additional patches from Atmel AT32STK1000 BSP 2.0.0 CD, mostly LCD/splash support.
u-boot-1.1.4/at32stk1000/ap7000-add-spi-device-and-lcdc-base-address.patch | 112 +
u-boot-1.1.4/at32stk1000/at32ap-add-define-for-sdram-test.patch | 117 +
u-boot-1.1.4/at32stk1000/at32ap-add-framebuffer-address.patch | 11
u-boot-1.1.4/at32stk1000/at32ap-add-spi-initcalls.patch | 16
u-boot-1.1.4/at32stk1000/at32ap-add-system-manager-header-file.patch | 252 ++
u-boot-1.1.4/at32stk1000/atstk1000-add-lcd-and-spi-to-config.patch | 124 +
u-boot-1.1.4/at32stk1000/atstk1000-ltv350qv-display-support.patch | 163 +
u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch | 98
u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch | 120 +
u-boot-1.1.4/at32stk1000/cmd-bmp-add-gzip-compressed-bmp.patch | 90
u-boot-1.1.4/at32stk1000/fix-mmc-data-timeout.patch | 101
u-boot-1.1.4/at32stk1000/lcd-add-24-bpp-support-and-atmel-lcdc-support.patch | 670 ++++++
u-boot-1.1.4/at32stk1000/lcdc-driver-for-avr32.patch | 755 +++++++
u-boot-1.1.4/at32stk1000/libavr32-add-spi-and-lcd-board-support.patch | 61
u-boot-1.1.4/at32stk1000/spi-driver-for-avr32.patch | 1026 ++++++++++
u-boot_1.1.4.bb | 48
Diffstat (limited to 'packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch')
-rw-r--r-- | packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch b/packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch new file mode 100644 index 0000000000..b9cdba16ff --- /dev/null +++ b/packages/u-boot/u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch @@ -0,0 +1,98 @@ +diff -uprN u-boot-orig/board/atstk1000/spi.c u-boot/board/atstk1000/spi.c +--- u-boot-orig/board/atstk1000/spi.c 1970-01-01 01:00:00.000000000 +0100 ++++ u-boot/board/atstk1000/spi.c 2007-01-03 08:46:36.000000000 +0100 +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (C) 2006 Atmel Corporation ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++#include <common.h> ++ ++#include <spi.h> ++#include <asm/io.h> ++#include <atmel_spi.h> ++ ++extern void ltv350qv_init(void); ++ ++static struct spi_options_t cs0 = { ++ .reg = 0, ++ .baudrate = 200000, ++ .bits = 8, ++ .spck_delay = 0, ++ .trans_delay = 0, ++ .stay_act = 1, ++ .spi_mode = 3, ++}; ++static struct spi_options_t cs1 = { ++ .reg = 1, ++ .baudrate = 1500000, ++ .bits = 8, ++ .spck_delay = 0, ++ .trans_delay = 0, ++ .stay_act = 1, ++ .spi_mode = 3, ++}; ++ ++void spi_chipsel_dac(int cs) ++{ ++ if (cs) spi_select_chip(0); ++ else spi_unselect_chip(0); ++} ++ ++void spi_chipsel_lcd(int cs) ++{ ++ if (cs) spi_select_chip(1); ++ else spi_unselect_chip(1); ++} ++ ++spi_chipsel_type spi_chipsel[] = { ++ spi_chipsel_dac, ++ spi_chipsel_lcd, ++}; ++int spi_chipsel_cnt = sizeof(spi_chipsel) / sizeof(spi_chipsel[0]); ++ ++void board_init_spi(void) ++{ ++ int ret; ++ ++ spi_init(); ++ ++ ret = spi_setup_chip_reg(&cs0, 45000000); /* TODO: get APBA speed */ ++ if (ret) ++ return; ++ ret = spi_setup_chip_reg(&cs1, 45000000); /* TODO: get APBA speed */ ++ if (ret) ++ return; ++ ++ spi_enable(); ++ ++ ltv350qv_init(); ++} +diff -uprN u-boot-orig/board/atstk1000/Makefile u-boot/board/atstk1000/Makefile +--- u-boot-orig/board/atstk1000/Makefile 2007-01-01 19:26:46.000000000 +0100 ++++ u-boot/board/atstk1000/Makefile 2007-01-01 16:23:12.000000000 +0100 +@@ -31,6 +31,7 @@ endif + LIB := lib$(BOARD).a + + SRC := $(BOARD).c $(DAUGHTERBOARD).c eth.c flash.c ++SRC += spi.c + OBJS := $(addsuffix .o,$(basename $(SRC))) + + .PHONY: all |