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: Make intc messages consistent via pr_fmt.
  sh: make sure static declaration on ms7724se
  sh: make sure static declaration on mach-migor
  sh: make sure static declaration on mach-ecovec24
  sh: make sure static declaration on mach-ap325rxa
  clocksource: sh_cmt: compute mult and shift before registration
  clocksource: sh_tmu: compute mult and shift before registration
  sh: PIO disabling for x3proto and urquell.
  sh: mach-sdk7786: conditionally disable PIO support.
  sh: support for platforms without PIO.
  usb: r8a66597-hcd pio to mmio accessor conversion.
  usb: gadget: r8a66597-udc pio to mmio accessor conversion.
  usb: gadget: m66592-udc pio to mmio accessor conversion.
  sh: add romImage MMCIF boot for sh7724 and Ecovec V2
  sh: add boot code to MMCIF driver header
  sh: prepare MMCIF driver header file
  sh: allow romImage data between head.S and the zero page
  sh: Add support MMCIF for ecovec
  sh: remove duplicated #include
  input: serio: disable i8042 for non-cayman sh platforms.
  ...
  • Loading branch information
torvalds committed Jun 4, 2010
2 parents 9a9620d + ac422f9 commit 999fd1a
Show file tree
Hide file tree
Showing 36 changed files with 642 additions and 204 deletions.
16 changes: 15 additions & 1 deletion arch/sh/Kconfig
Expand Up @@ -9,7 +9,7 @@ config SUPERH
def_bool y
select EMBEDDED
select HAVE_CLK
select HAVE_IDE
select HAVE_IDE if HAS_IOPORT
select HAVE_LMB
select HAVE_OPROFILE
select HAVE_GENERIC_DMA_COHERENT
Expand Down Expand Up @@ -174,6 +174,9 @@ config ARCH_HAS_DEFAULT_IDLE
config ARCH_HAS_CPU_IDLE_WAIT
def_bool y

config NO_IOPORT
bool

config IO_TRAPPED
bool

Expand Down Expand Up @@ -776,6 +779,17 @@ config ENTRY_OFFSET
default "0x00010000" if PAGE_SIZE_64KB
default "0x00000000"

config ROMIMAGE_MMCIF
bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
depends on CPU_SUBTYPE_SH7724 && EXPERIMENTAL
help
Say Y here to include experimental MMCIF loading code in
romImage. With this enabled it is possible to write the romImage
kernel image to an MMC card and boot the kernel straight from
the reset vector. At reset the processor Mask ROM will load the
first part of the romImage which in turn loads the rest the kernel
image to RAM using the MMCIF hardware block.

choice
prompt "Kernel command line"
optional
Expand Down
3 changes: 3 additions & 0 deletions arch/sh/boards/Kconfig
Expand Up @@ -154,6 +154,7 @@ config SH_SDK7786
bool "SDK7786"
depends on CPU_SUBTYPE_SH7786
select SYS_SUPPORTS_PCI
select NO_IOPORT if !PCI
help
Select SDK7786 if configuring for a Renesas Technology Europe
SH7786-65nm board.
Expand Down Expand Up @@ -190,6 +191,7 @@ config SH_URQUELL
depends on CPU_SUBTYPE_SH7786
select ARCH_REQUIRE_GPIOLIB
select SYS_SUPPORTS_PCI
select NO_IOPORT if !PCI

config SH_MIGOR
bool "Migo-R"
Expand Down Expand Up @@ -286,6 +288,7 @@ config SH_LBOX_RE2
config SH_X3PROTO
bool "SH-X3 Prototype board"
depends on CPU_SUBTYPE_SHX3
select NO_IOPORT if !PCI

config SH_MAGIC_PANEL_R2
bool "Magic Panel R2"
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-ap325rxa/setup.c
Expand Up @@ -328,7 +328,7 @@ static struct soc_camera_platform_info camera_info = {
.set_capture = camera_set_capture,
};

struct soc_camera_link camera_link = {
static struct soc_camera_link camera_link = {
.bus_id = 0,
.add_device = ap325rxa_camera_add,
.del_device = ap325rxa_camera_del,
Expand Down
101 changes: 91 additions & 10 deletions arch/sh/boards/mach-ecovec24/setup.c
Expand Up @@ -12,6 +12,8 @@
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <linux/mmc/host.h>
#include <linux/mmc/sh_mmcif.h>
#include <linux/mtd/physmap.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
Expand All @@ -26,7 +28,6 @@
#include <linux/mmc/host.h>
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <video/sh_mobile_lcdc.h>
#include <sound/sh_fsi.h>
#include <media/sh_mobile_ceu.h>
Expand Down Expand Up @@ -139,7 +140,7 @@ static struct resource sh_eth_resources[] = {
},
};

struct sh_eth_plat_data sh_eth_plat = {
static struct sh_eth_plat_data sh_eth_plat = {
.phy = 0x1f, /* SMSC LAN8700 */
.edmac_endian = EDMAC_LITTLE_ENDIAN,
.ether_link_active_low = 1
Expand All @@ -159,7 +160,7 @@ static struct platform_device sh_eth_device = {
};

/* USB0 host */
void usb0_port_power(int port, int power)
static void usb0_port_power(int port, int power)
{
gpio_set_value(GPIO_PTB4, power);
}
Expand Down Expand Up @@ -195,7 +196,7 @@ static struct platform_device usb0_host_device = {
};

/* USB1 host/function */
void usb1_port_power(int port, int power)
static void usb1_port_power(int port, int power)
{
gpio_set_value(GPIO_PTB5, power);
}
Expand Down Expand Up @@ -421,7 +422,7 @@ static int ts_init(void)
return 0;
}

struct tsc2007_platform_data tsc2007_info = {
static struct tsc2007_platform_data tsc2007_info = {
.model = 2007,
.x_plate_ohms = 180,
.get_pendown_state = ts_get_pendown_state,
Expand All @@ -436,7 +437,7 @@ static struct i2c_board_info ts_i2c_clients = {
};

#ifdef CONFIG_MFD_SH_MOBILE_SDHI
/* SHDI0 */
/* SDHI0 */
static void sdhi0_set_pwr(struct platform_device *pdev, int state)
{
gpio_set_value(GPIO_PTB6, state);
Expand Down Expand Up @@ -474,7 +475,8 @@ static struct platform_device sdhi0_device = {
},
};

/* SHDI1 */
#if !defined(CONFIG_MMC_SH_MMCIF)
/* SDHI1 */
static void sdhi1_set_pwr(struct platform_device *pdev, int state)
{
gpio_set_value(GPIO_PTB7, state);
Expand Down Expand Up @@ -511,6 +513,7 @@ static struct platform_device sdhi1_device = {
.hwblk_id = HWBLK_SDHI1,
},
};
#endif /* CONFIG_MMC_SH_MMCIF */

#else

Expand Down Expand Up @@ -720,7 +723,7 @@ static struct clk fsimckb_clk = {
.rate = 0, /* unknown */
};

struct sh_fsi_platform_info fsi_info = {
static struct sh_fsi_platform_info fsi_info = {
.portb_flags = SH_FSI_BRS_INV |
SH_FSI_OUT_SLAVE_MODE |
SH_FSI_IN_SLAVE_MODE |
Expand Down Expand Up @@ -777,7 +780,7 @@ static struct platform_device irda_device = {
#include <media/ak881x.h>
#include <media/sh_vou.h>

struct ak881x_pdata ak881x_pdata = {
static struct ak881x_pdata ak881x_pdata = {
.flags = AK881X_IF_MODE_SLAVE,
};

Expand All @@ -786,7 +789,7 @@ static struct i2c_board_info ak8813 = {
.platform_data = &ak881x_pdata,
};

struct sh_vou_pdata sh_vou_pdata = {
static struct sh_vou_pdata sh_vou_pdata = {
.bus_fmt = SH_VOU_BUS_8BIT,
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813,
Expand Down Expand Up @@ -819,6 +822,58 @@ static struct platform_device vou_device = {
},
};

#if defined(CONFIG_MMC_SH_MMCIF)
/* SH_MMCIF */
static void mmcif_set_pwr(struct platform_device *pdev, int state)
{
gpio_set_value(GPIO_PTB7, state);
}

static void mmcif_down_pwr(struct platform_device *pdev)
{
gpio_set_value(GPIO_PTB7, 0);
}

static struct resource sh_mmcif_resources[] = {
[0] = {
.name = "SH_MMCIF",
.start = 0xA4CA0000,
.end = 0xA4CA00FF,
.flags = IORESOURCE_MEM,
},
[1] = {
/* MMC2I */
.start = 29,
.flags = IORESOURCE_IRQ,
},
[2] = {
/* MMC3I */
.start = 30,
.flags = IORESOURCE_IRQ,
},
};

static struct sh_mmcif_plat_data sh_mmcif_plat = {
.set_pwr = mmcif_set_pwr,
.down_pwr = mmcif_down_pwr,
.sup_pclk = 0, /* SH7724: Max Pclk/2 */
.caps = MMC_CAP_4_BIT_DATA |
MMC_CAP_8_BIT_DATA |
MMC_CAP_NEEDS_POLL,
.ocr = MMC_VDD_32_33 | MMC_VDD_33_34,
};

static struct platform_device sh_mmcif_device = {
.name = "sh_mmcif",
.id = 0,
.dev = {
.platform_data = &sh_mmcif_plat,
},
.num_resources = ARRAY_SIZE(sh_mmcif_resources),
.resource = sh_mmcif_resources,
};
#endif

static struct platform_device *ecovec_devices[] __initdata = {
&heartbeat_device,
&nor_flash_device,
Expand All @@ -831,7 +886,9 @@ static struct platform_device *ecovec_devices[] __initdata = {
&keysc_device,
#ifdef CONFIG_MFD_SH_MOBILE_SDHI
&sdhi0_device,
#if !defined(CONFIG_MMC_SH_MMCIF)
&sdhi1_device,
#endif
#else
&msiof0_device,
#endif
Expand All @@ -841,6 +898,9 @@ static struct platform_device *ecovec_devices[] __initdata = {
&fsi_device,
&irda_device,
&vou_device,
#if defined(CONFIG_MMC_SH_MMCIF)
&sh_mmcif_device,
#endif
};

#ifdef CONFIG_I2C
Expand Down Expand Up @@ -1134,6 +1194,7 @@ static int __init arch_setup(void)
gpio_request(GPIO_PTB6, NULL);
gpio_direction_output(GPIO_PTB6, 0);

#if !defined(CONFIG_MMC_SH_MMCIF)
/* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */
gpio_request(GPIO_FN_SDHI1CD, NULL);
gpio_request(GPIO_FN_SDHI1WP, NULL);
Expand All @@ -1148,6 +1209,7 @@ static int __init arch_setup(void)

/* I/O buffer drive ability is high for SDHI1 */
__raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA);
#endif /* CONFIG_MMC_SH_MMCIF */
#else
/* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */
gpio_request(GPIO_FN_MSIOF0_TXD, NULL);
Expand Down Expand Up @@ -1223,6 +1285,25 @@ static int __init arch_setup(void)
gpio_request(GPIO_PTU5, NULL);
gpio_direction_output(GPIO_PTU5, 0);

#if defined(CONFIG_MMC_SH_MMCIF)
/* enable MMCIF (needs DS2.6,7 set to OFF,ON) */
gpio_request(GPIO_FN_MMC_D7, NULL);
gpio_request(GPIO_FN_MMC_D6, NULL);
gpio_request(GPIO_FN_MMC_D5, NULL);
gpio_request(GPIO_FN_MMC_D4, NULL);
gpio_request(GPIO_FN_MMC_D3, NULL);
gpio_request(GPIO_FN_MMC_D2, NULL);
gpio_request(GPIO_FN_MMC_D1, NULL);
gpio_request(GPIO_FN_MMC_D0, NULL);
gpio_request(GPIO_FN_MMC_CLK, NULL);
gpio_request(GPIO_FN_MMC_CMD, NULL);
gpio_request(GPIO_PTB7, NULL);
gpio_direction_output(GPIO_PTB7, 0);

/* I/O buffer drive ability is high for MMCIF */
__raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA);
#endif

/* enable I2C device */
i2c_register_board_info(0, i2c0_devices,
ARRAY_SIZE(i2c0_devices));
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-migor/setup.c
Expand Up @@ -181,7 +181,7 @@ static int migor_nand_flash_ready(struct mtd_info *mtd)
return gpio_get_value(GPIO_PTA1); /* NAND_RBn */
}

struct platform_nand_data migor_nand_flash_data = {
static struct platform_nand_data migor_nand_flash_data = {
.chip = {
.nr_chips = 1,
.partitions = migor_nand_flash_partitions,
Expand Down
8 changes: 4 additions & 4 deletions arch/sh/boards/mach-se/7724/setup.c
Expand Up @@ -283,7 +283,7 @@ static struct clk fsimcka_clk = {
};

/* change J20, J21, J22 pin to 1-2 connection to use slave mode */
struct sh_fsi_platform_info fsi_info = {
static struct sh_fsi_platform_info fsi_info = {
.porta_flags = SH_FSI_BRS_INV |
SH_FSI_OUT_SLAVE_MODE |
SH_FSI_IN_SLAVE_MODE |
Expand Down Expand Up @@ -371,7 +371,7 @@ static struct resource sh_eth_resources[] = {
},
};

struct sh_eth_plat_data sh_eth_plat = {
static struct sh_eth_plat_data sh_eth_plat = {
.phy = 0x1f, /* SMSC LAN8187 */
.edmac_endian = EDMAC_LITTLE_ENDIAN,
};
Expand Down Expand Up @@ -535,7 +535,7 @@ static struct platform_device irda_device = {
#include <media/ak881x.h>
#include <media/sh_vou.h>

struct ak881x_pdata ak881x_pdata = {
static struct ak881x_pdata ak881x_pdata = {
.flags = AK881X_IF_MODE_SLAVE,
};

Expand All @@ -545,7 +545,7 @@ static struct i2c_board_info ak8813 = {
.platform_data = &ak881x_pdata,
};

struct sh_vou_pdata sh_vou_pdata = {
static struct sh_vou_pdata sh_vou_pdata = {
.bus_fmt = SH_VOU_BUS_8BIT,
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813,
Expand Down
13 changes: 9 additions & 4 deletions arch/sh/boot/romimage/Makefile
@@ -1,16 +1,21 @@
#
# linux/arch/sh/boot/romimage/Makefile
#
# create an image suitable for burning to flash from zImage
# create an romImage file suitable for burning to flash/mmc from zImage
#

targets := vmlinux head.o zeropage.bin piggy.o
load-y := 0

OBJECTS = $(obj)/head.o
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart \
mmcif-load-$(CONFIG_CPU_SUBTYPE_SH7724) := 0xe5200000 # ILRAM
mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o
load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y)
obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y)

LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \
-T $(obj)/../../kernel/vmlinux.lds

$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
$(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE
$(call if_changed,ld)
@:

Expand Down

0 comments on commit 999fd1a

Please sign in to comment.