Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
  sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().
  sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
  sh: sh7785 pinmux support
  sh: update defconfigs.
  sh: Kill off unused p1fc divisors from SH7763 clk fwk.
  sh: improve pinmux support for single direction pins
  sh: use 10MHz VIO_CLK for ov772x on Migo-R
  sh: Update gpio_set_value() pin value handling
  sh: update ov772x byte order on Migo-R
  rtc: Add R2025S/D comment to rs5c372 Kconfig entry.
  sh: Export cache flush routines needed by sh_eth on SH7619.
  sh: Wire up oops reporting in the die notifier chain.
  sh: ap325rxa: Kill off unused port definitions.
  sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.
  sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.
  sh: add support FLCTL for ap325rxa board
  sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
  sh: rsk7203: leds-gpio support for RSK+ LEDs.
  sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.
  sh: fix soc-camera compile breakage on Migo-R.
  ...
  • Loading branch information
torvalds committed Oct 23, 2008
2 parents 70740d6 + e4b41db commit 36ec891
Show file tree
Hide file tree
Showing 57 changed files with 7,836 additions and 4,045 deletions.
64 changes: 58 additions & 6 deletions arch/sh/boards/board-ap325rxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/sh_flctl.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/smc911x.h>
Expand Down Expand Up @@ -108,10 +109,45 @@ static struct platform_device ap325rxa_nor_flash_device = {
},
};

static struct mtd_partition nand_partition_info[] = {
{
.name = "nand_data",
.offset = 0,
.size = MTDPART_SIZ_FULL,
},
};

static struct resource nand_flash_resources[] = {
[0] = {
.start = 0xa4530000,
.end = 0xa45300ff,
.flags = IORESOURCE_MEM,
}
};

static struct sh_flctl_platform_data nand_flash_data = {
.parts = nand_partition_info,
.nr_parts = ARRAY_SIZE(nand_partition_info),
.flcmncr_val = FCKSEL_E | TYPESEL_SET | NANWF_E,
.has_hwecc = 1,
};

static struct platform_device nand_flash_device = {
.name = "sh_flctl",
.resource = nand_flash_resources,
.num_resources = ARRAY_SIZE(nand_flash_resources),
.dev = {
.platform_data = &nand_flash_data,
},
};

#define FPGA_LCDREG 0xB4100180
#define FPGA_BKLREG 0xB4100212
#define FPGA_LCDREG_VAL 0x0018
#define PORT_MSELCRB 0xA4050182
#define PORT_HIZCRC 0xA405015C
#define PORT_DRVCRA 0xA405018A
#define PORT_DRVCRB 0xA405018C

static void ap320_wvga_power_on(void *board_data)
{
Expand Down Expand Up @@ -282,6 +318,7 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
#ifdef CONFIG_I2C
&camera_device,
#endif
&nand_flash_device,
};

static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
Expand Down Expand Up @@ -364,21 +401,36 @@ static int __init ap325rxa_devices_setup(void)

ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);

/* FLCTL */
gpio_request(GPIO_FN_FCE, NULL);
gpio_request(GPIO_FN_NAF7, NULL);
gpio_request(GPIO_FN_NAF6, NULL);
gpio_request(GPIO_FN_NAF5, NULL);
gpio_request(GPIO_FN_NAF4, NULL);
gpio_request(GPIO_FN_NAF3, NULL);
gpio_request(GPIO_FN_NAF2, NULL);
gpio_request(GPIO_FN_NAF1, NULL);
gpio_request(GPIO_FN_NAF0, NULL);
gpio_request(GPIO_FN_FCDE, NULL);
gpio_request(GPIO_FN_FOE, NULL);
gpio_request(GPIO_FN_FSC, NULL);
gpio_request(GPIO_FN_FWE, NULL);
gpio_request(GPIO_FN_FRB, NULL);

ctrl_outw(0, PORT_HIZCRC);
ctrl_outw(0xFFFF, PORT_DRVCRA);
ctrl_outw(0xFFFF, PORT_DRVCRB);

platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);

i2c_register_board_info(0, ap325rxa_i2c_devices,
ARRAY_SIZE(ap325rxa_i2c_devices));

return platform_add_devices(ap325rxa_devices,
ARRAY_SIZE(ap325rxa_devices));
}
device_initcall(ap325rxa_devices_setup);

static void __init ap325rxa_setup(char **cmdline_p)
{
}

static struct sh_machine_vector mv_ap325rxa __initmv = {
.mv_name = "AP-325RXA",
.mv_setup = ap325rxa_setup,
};
44 changes: 38 additions & 6 deletions arch/sh/boards/board-rsk7203.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#include <linux/mtd/map.h>
#include <linux/smc911x.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <asm/machvec.h>
#include <asm/io.h>
#include <asm/sh7203.h>
#include <cpu/sh7203.h>

static struct smc911x_platdata smc911x_info = {
.flags = SMC911X_USE_16BIT,
Expand Down Expand Up @@ -116,10 +117,46 @@ static void __init set_mtd_partitions(void)
}
}

static struct gpio_led rsk7203_gpio_leds[] = {
{
.name = "green",
.gpio = GPIO_PE10,
.active_low = 1,
}, {
.name = "orange",
.default_trigger = "nand-disk",
.gpio = GPIO_PE12,
.active_low = 1,
}, {
.name = "red:timer",
.default_trigger = "timer",
.gpio = GPIO_PC14,
.active_low = 1,
}, {
.name = "red:heartbeat",
.default_trigger = "heartbeat",
.gpio = GPIO_PE11,
.active_low = 1,
},
};

static struct gpio_led_platform_data rsk7203_gpio_leds_info = {
.leds = rsk7203_gpio_leds,
.num_leds = ARRAY_SIZE(rsk7203_gpio_leds),
};

static struct platform_device led_device = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &rsk7203_gpio_leds_info,
},
};

static struct platform_device *rsk7203_devices[] __initdata = {
&smc911x_device,
&flash_device,
&led_device,
};

static int __init rsk7203_devices_setup(void)
Expand All @@ -128,11 +165,6 @@ static int __init rsk7203_devices_setup(void)
gpio_request(GPIO_FN_TXD0, NULL);
gpio_request(GPIO_FN_RXD0, NULL);

/* Lit LED0 */
gpio_request(GPIO_PE10, NULL);
gpio_direction_output(GPIO_PE10, 0);
gpio_export(GPIO_PE10, 0);

set_mtd_partitions();
return platform_add_devices(rsk7203_devices,
ARRAY_SIZE(rsk7203_devices));
Expand Down
1 change: 1 addition & 0 deletions arch/sh/boards/mach-highlander/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config SH_R7780MP
config SH_R7785RP
bool "R7785RP board support"
depends on CPU_SUBTYPE_SH7785
select GENERIC_GPIO

endchoice

Expand Down
10 changes: 5 additions & 5 deletions arch/sh/boards/mach-highlander/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# Makefile for the R7780RP-1 specific parts of the kernel
# Makefile for the Highlander specific parts of the kernel
#
irqinit-$(CONFIG_SH_R7780MP) := irq-r7780mp.o
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
irqinit-$(CONFIG_SH_R7780RP) := irq-r7780rp.o
obj-y := setup.o $(irqinit-y)
obj-y := setup.o
obj-$(CONFIG_SH_R7780RP) += irq-r7780rp.o
obj-$(CONFIG_SH_R7780MP) += irq-r7780mp.o
obj-$(CONFIG_SH_R7785RP) += irq-r7785rp.o pinmux-r7785rp.o

ifneq ($(CONFIG_SH_R7785RP),y)
obj-$(CONFIG_PUSH_SWITCH) += psw.o
Expand Down
20 changes: 20 additions & 0 deletions arch/sh/boards/mach-highlander/pinmux-r7785rp.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008 Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/init.h>
#include <linux/gpio.h>
#include <cpu/sh7785.h>

void __init highlander_plat_pinmux_setup(void)
{
/* SCIF0 */
gpio_request(GPIO_FN_SCIF0_CTS, NULL);
gpio_request(GPIO_FN_SCIF0_RTS, NULL);
gpio_request(GPIO_FN_SCIF0_SCK, NULL);
gpio_request(GPIO_FN_SCIF0_RXD, NULL);
gpio_request(GPIO_FN_SCIF0_TXD, NULL);
}
2 changes: 2 additions & 0 deletions arch/sh/boards/mach-highlander/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ static void __init highlander_setup(char **cmdline_p)
(ver >> 12) & 0xf, (ver >> 8) & 0xf,
(ver >> 4) & 0xf, ver & 0xf);

highlander_plat_pinmux_setup();

/*
* Enable the important clocks right away..
*/
Expand Down
18 changes: 14 additions & 4 deletions arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,11 @@ static struct clk *camera_clk;

static void camera_power_on(void)
{
/* Use 10 MHz VIO_CKO instead of 24 MHz to work
* around signal quality issues on Panel Board V2.1.
*/
camera_clk = clk_get(NULL, "video_clk");
clk_set_rate(camera_clk, 24000000);
clk_set_rate(camera_clk, 10000000);
clk_enable(camera_clk); /* start VIO_CKO */

/* use VIO_RST to take camera out of reset */
Expand All @@ -307,10 +310,18 @@ static void camera_power_off(void)
gpio_set_value(GPIO_PTT3, 0);
}

static void camera_power(int mode)
{
if (mode)
camera_power_on();
else
camera_power_off();
}

#ifdef CONFIG_I2C
static unsigned char camera_ov772x_magic[] =
{
0x09, 0x01, 0x0c, 0x10, 0x0d, 0x41, 0x0e, 0x01,
0x09, 0x01, 0x0c, 0x20, 0x0d, 0x41, 0x0e, 0x01,
0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00,
0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07,
0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10,
Expand Down Expand Up @@ -386,6 +397,7 @@ static struct soc_camera_platform_info ov772x_info = {
},
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
.power = camera_power,
.set_capture = ov772x_set_capture,
};

Expand All @@ -400,8 +412,6 @@ static struct platform_device migor_camera_device = {
static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
.enable_camera = camera_power_on,
.disable_camera = camera_power_off,
};

static struct resource migor_ceu_resources[] = {
Expand Down
Loading

0 comments on commit 36ec891

Please sign in to comment.