core/linux-am33x to 3.2.18-1

This commit is contained in:
Kevin Mihelich 2012-06-14 13:25:22 -04:00
parent 6e5963c94c
commit 7a7e2ff6e3
6 changed files with 1506 additions and 1141 deletions

View file

@ -1,73 +0,0 @@
From dd3f24640c209d8186010dbf2bbabe11f3eb52ce Mon Sep 17 00:00:00 2001
From: Matt Porter <mporter@ti.com>
Date: Mon, 21 Nov 2011 12:56:52 -0500
Subject: [PATCH 2/3] beaglebone: hack in support for the WIP st7735fb driver
Signed-off-by: Matt Porter <mporter@ti.com>
---
arch/arm/mach-omap2/board-am335xevm.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
index b27fb97..f049aad 100644
--- arch.orig/arm/mach-omap2/board-am335xevm.c
+++ arch/arm/mach-omap2/board-am335xevm.c
@@ -51,6 +51,7 @@
/* LCD controller is similar to DA850 */
#include <video/da8xx-fb.h>
+#include <video/st7735fb.h>
#include "control.h"
#include "board-flash.h"
@@ -1094,6 +1095,23 @@ static struct spi_board_info am335x_spi1_slave_info[] = {
},
};
+static const struct st7735fb_platform_data bone_st7735fb_data = {
+ .rst_gpio = GPIO_TO_PIN(3, 19),
+ .dc_gpio = GPIO_TO_PIN(3, 21),
+};
+
+static struct spi_board_info bone_spi1_slave_info[] = {
+ {
+ .modalias = "adafruit_tft18",
+ .platform_data = &bone_st7735fb_data,
+ .irq = -1,
+ .max_speed_hz = 8000000,
+ .bus_num = 2,
+ .chip_select = 0,
+ .mode = SPI_MODE_3,
+ },
+};
+
static void evm_nand_init(int evm_id, int profile)
{
setup_pin_mux(nand_pin_mux);
@@ -1410,6 +1428,14 @@ static void spi1_init(int evm_id, int profile)
return;
}
+/* setup bone spi1 */
+static void bone_spi1_init(int evm_id, int profile)
+{
+ setup_pin_mux(spi1_pin_mux);
+ spi_register_board_info(bone_spi1_slave_info,
+ ARRAY_SIZE(bone_spi1_slave_info));
+ return;
+}
static int beaglebone_phy_fixup(struct phy_device *phydev)
{
@@ -1567,6 +1593,8 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
+ /* HACK ALERT */
+ {bone_spi1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{NULL, 0, 0},
};
--
1.7.2.5

View file

@ -1,97 +0,0 @@
From 9c2332f1376f5fb7c87f16dff77e9270eb7c91c8 Mon Sep 17 00:00:00 2001
From: Matt Porter <mporter@ti.com>
Date: Tue, 22 Nov 2011 10:48:32 -0500
Subject: [PATCH 3/3] st7735fb: Make FB native endian on little endian platforms
This is a quick unoptimized implementation of a shadow swap buffer
which is engaged on little endian platforms. It's not DMA safe
at this point nor is it particularly optimized during updates.
This is ok atm since the point is to be compatible with all the
user space code out there that assumes that all FBdevs are native
endian.
Now things like "cat foo.rgb565 > /dev/fb0" work as well as standard
apps like fbv with no byte swapping mods.
Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
drivers/video/st7735fb.c | 26 ++++++++++++++++++++------
include/video/st7735fb.h | 1 +
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c
index 500cc88..69ad3d0 100644
--- drivers.old/video/st7735fb.c
+++ drivers/video/st7735fb.c
@@ -244,7 +244,14 @@ static void st7735fb_update_display(struct st7735fb_par *par)
{
int ret = 0;
u8 *vmem = par->info->screen_base;
+#ifdef __LITTLE_ENDIAN
+ int i;
+ u16 *vmem16 = (u16 *)vmem;
+ u16 *ssbuf = par->ssbuf;
+ for (i=0; i<WIDTH*HEIGHT*BPP/8/2; i++)
+ ssbuf[i] = swab16(vmem16[i]);
+#endif
/*
TODO:
Allow a subset of pages to be passed in
@@ -261,7 +268,11 @@ static void st7735fb_update_display(struct st7735fb_par *par)
st7735_write_cmd(par, ST7735_RAMWR);
/* Blast framebuffer to ST7735 internal display RAM */
+#ifdef __LITTLE_ENDIAN
+ ret = st7735_write_data_buf(par, (u8 *)ssbuf, WIDTH*HEIGHT*BPP/8);
+#else
ret = st7735_write_data_buf(par, vmem, WIDTH*HEIGHT*BPP/8);
+#endif
if (ret < 0)
pr_err("%s: spi_write failed to update display buffer\n",
par->info->fix.id);
@@ -417,12 +428,7 @@ static int __devinit st7735fb_probe (struct spi_device *spi)
info->var.blue.length = 5;
info->var.transp.offset = 0;
info->var.transp.length = 0;
- info->flags = FBINFO_FLAG_DEFAULT |
-#ifdef __LITTLE_ENDIAN
- FBINFO_FOREIGN_ENDIAN |
-#endif
- FBINFO_VIRTFB;
-
+ info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
info->fbdefio = &st7735fb_defio;
fb_deferred_io_init(info);
@@ -432,6 +438,14 @@ static int __devinit st7735fb_probe (struct spi_device *spi)
par->rst = pdata->rst_gpio;
par->dc = pdata->dc_gpio;
+#ifdef __LITTLE_ENDIAN
+ /* Allocate swapped shadow buffer */
+ vmem = vzalloc(vmem_size);
+ if (!vmem)
+ return retval;
+ par->ssbuf = vmem;
+#endif
+
retval = register_framebuffer(info);
if (retval < 0)
goto fbreg_fail;
diff --git a/include/video/st7735fb.h b/include/video/st7735fb.h
index 250f036..52f5182 100644
--- include.orig/video/st7735fb.h
+++ include/video/st7735fb.h
@@ -34,6 +34,7 @@ enum st7735_cmd {
struct st7735fb_par {
struct spi_device *spi;
struct fb_info *info;
+ u16 *ssbuf;
int rst;
int dc;
};
--
1.7.2.5

View file

@ -1,51 +0,0 @@
--- arch.orig/arm/mach-omap2/board-am335xevm.c 2012-02-18 10:43:40.000000000 -0500
+++ arch/arm/mach-omap2/board-am335xevm.c 2012-02-18 10:43:29.000000000 -0500
@@ -1518,6 +1518,16 @@
},
};
+static struct spi_board_info bone_am335x_slave_info[] = {
+ {
+ .modalias = "spidev",
+ .irq = -1,
+ .max_speed_hz = 12000000,
+ .bus_num = 2,
+ .chip_select = 0,
+ },
+};
+
static void evm_nand_init(int evm_id, int profile)
{
setup_pin_mux(nand_pin_mux);
@@ -2061,6 +2071,15 @@
return;
}
+/* setup beaglebone spi1 */
+static void bone_spi1_init(int evm_id, int profile)
+{
+ setup_pin_mux(spi1_pin_mux);
+ spi_register_board_info(bone_am335x_slave_info,
+ ARRAY_SIZE(bone_am335x_slave_info));
+ return;
+}
+
static int beaglebone_phy_fixup(struct phy_device *phydev)
{
@@ -2216,6 +2235,7 @@
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
+ {bone_spi1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{NULL, 0, 0},
};
@@ -2228,6 +2248,7 @@
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
+ {bone_spi1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{NULL, 0, 0},
};

View file

@ -1,47 +1,83 @@
# Maintainer: Stephen Oliver <mrsteveman1@gmail.com>
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# am33x kernel and headers
# - note: any other kernel packages should include headers for that march
# - there will be no v7 kernel26 package, each march will be tagged individually
noautobuild=1
plugrel=1
buildarch=4
pkgbase=linux-am33x
pkgname=('linux-am33x' 'linux-headers-am33x')
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel="am33x"
pkgver=3.2.14
pkgrel=alarm11
arch=('armv7h')
_basekernel=3.2
pkgver=${_basekernel}.18
pkgrel=1
arch=('arm')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'git')
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage')
options=('!strip')
source=("config"
"https://github.com/koenkooi/linux/zipball/linux-ti33x-psp-3.2-r10b+gitre8004dad869568692ca2a45c04e8464ce48cc4d7"
"ARM-omap-am33x-BeagleBone-userspace-SPI-support.patch"
"0002-beaglebone-hack-in-support-for-the-WIP-st7735fb-driv.patch"
"0003-st7735fb-Make-FB-native-endian-on-little-endian-plat.patch")
source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.xz"
#"ftp://ftp.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.bz2"
"rcn-ee.diff.gz::http://rcn-ee.net/deb/sid-armhf/v3.2.18-psp14/patch-3.2-psp14.diff.gz"
'config'
'change-default-console-loglevel.patch'
'aufs3-3.2.patch.gz')
md5sums=('364066fa18767ec0ae5f4e4abcf9dc51'
'f91b0144e8b0d4e5cbe1f2de2a2299f3'
'e71a80e5a2f948e66a6452047a6c8eee'
'9d3c56a4b999c8bfbd4018089a62f662'
'6ea7b005a74be27abb072c934ef15a2c')
build() {
cd "${srcdir}/linux-${_basekernel}"
cd $srcdir
#patch -p1 -i "${srcdir}/patch-${pkgver}"
mv koenkooi-linux-* linux
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
ln -s "${srcdir}/config" "${srcdir}/linux/.config"
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
cd $srcdir/linux
patch -Np0 -i "${srcdir}/ARM-omap-am33x-BeagleBone-userspace-SPI-support.patch"
# these are crude patches that hack in support for an SPI framebuffer, probably conflicts with spidev and cape configuration so they're disabled.
#patch -Np0 -i "${srcdir}/0002-beaglebone-hack-in-support-for-the-WIP-st7735fb-driv.patch"
#patch -Np0 -i "${srcdir}/0003-st7735fb-Make-FB-native-endian-on-little-endian-plat.patch"
make prepare
# ALARM patches
patch -Np1 -i "${srcdir}/rcn-ee.diff"
patch -Np1 -i "${srcdir}/aufs3-3.2.patch"
make ${MAKEFLAGS} uImage modules
cat "${srcdir}/config" > ./.config
# set extraversion to pkgrel
sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
# get kernel version
make prepare
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
#make menuconfig # CLI menu for configuration
#make nconfig # new CLI menu for configuration
#make xconfig # X-based configuration
#make oldconfig # using old config from previous kernel version
# ... or manually edit .config
# Copy back our configuration (use with new kernel version)
#cp ./.config ../${_basekernel}.config
####################
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
####################
#yes "" | make config
# build!
make ${MAKEFLAGS} uImage modules
}
package_linux-am33x() {
@ -55,7 +91,7 @@ package_linux-am33x() {
backup=("etc/mkinitcpio.d/${pkgname}.preset")
install=${pkgname}.install
cd "${srcdir}/linux"
cd "${srcdir}/linux-${_basekernel}"
KARCH=arm
@ -96,7 +132,7 @@ package_linux-headers-am33x() {
cd "${pkgdir}/lib/modules/${_kernver}"
ln -sf ../../../usr/src/linux-${_kernver} build
cd "${srcdir}/linux"
cd "${srcdir}/linux-${_basekernel}"
install -D -m644 Makefile \
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
install -D -m644 kernel/Makefile \

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-am33x
KERNEL_VERSION=3.2.14-alarm11
KERNEL_VERSION=3.2.18-1-ARCH
post_install () {
# updating module dependencies