Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36ec8918 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 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.
  ...
parents 70740d6c e4b41dbd
Loading
Loading
Loading
Loading
+58 −6
Original line number Diff line number Diff line
@@ -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>
@@ -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)
{
@@ -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[] = {
@@ -364,6 +401,26 @@ 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,
@@ -374,11 +431,6 @@ static int __init ap325rxa_devices_setup(void)
}
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,
};
+38 −6
Original line number Diff line number Diff line
@@ -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,
@@ -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)
@@ -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));
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ config SH_R7780MP
config SH_R7785RP
	bool "R7785RP board support"
	depends on CPU_SUBTYPE_SH7785
	select GENERIC_GPIO

endchoice

+5 −5
Original line number Diff line number Diff line
#
# 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
+20 −0
Original line number Diff line number Diff line
/*
 * 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);
}
Loading