Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230532
b: refs/heads/master
c: 83eb95b
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jan 12, 2011
1 parent ce7bab1 commit af81b38
Show file tree
Hide file tree
Showing 23 changed files with 125 additions and 143 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bbe7b984096ac45586da2adf26c14069ecb79b2
refs/heads/master: 83eb95b852902f952ba594447a796ad8146b9462
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/board-edosk7705.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static int __init init_edosk7705_devices(void)
return platform_add_devices(edosk7705_devices,
ARRAY_SIZE(edosk7705_devices));
}
__initcall(init_edosk7705_devices);
device_initcall(init_edosk7705_devices);

/*
* The Machine Vector
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/board-edosk7760.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static int __init init_edosk7760_devices(void)
return platform_add_devices(edosk7760_devices,
ARRAY_SIZE(edosk7760_devices));
}
__initcall(init_edosk7760_devices);
device_initcall(init_edosk7760_devices);

/*
* The Machine Vector
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/board-sh7785lcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static int __init sh7785lcr_devices_setup(void)
return platform_add_devices(sh7785lcr_devices,
ARRAY_SIZE(sh7785lcr_devices));
}
__initcall(sh7785lcr_devices_setup);
device_initcall(sh7785lcr_devices_setup);

/* Initialize IRQ setting */
void __init init_sh7785lcr_IRQ(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/mach-cayman/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int __init smsc_superio_setup(void)

return 0;
}
__initcall(smsc_superio_setup);
device_initcall(smsc_superio_setup);

static void __iomem *cayman_ioport_map(unsigned long port, unsigned int len)
{
Expand Down
59 changes: 35 additions & 24 deletions trunk/arch/sh/boards/mach-landisk/irq.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* arch/sh/boards/landisk/irq.c
* arch/sh/boards/mach-landisk/irq.c
*
* I-O DATA Device, Inc. LANDISK Support
*
* Copyright (C) 2005-2007 kogiidena
* Copyright (C) 2011 Nobuhiro Iwamatsu
*
* Copyright (C) 2001 Ian da Silva, Jeremy Siegel
* Based largely on io_se.c.
Expand All @@ -12,44 +13,54 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/

#include <linux/init.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <mach-landisk/mach/iodata_landisk.h>

static void disable_landisk_irq(struct irq_data *data)
{
unsigned char mask = 0xff ^ (0x01 << (data->irq - 5));
enum {
UNUSED = 0,

__raw_writeb(__raw_readb(PA_IMASK) & mask, PA_IMASK);
}

static void enable_landisk_irq(struct irq_data *data)
{
unsigned char value = (0x01 << (data->irq - 5));
PCI_INTA, /* PCI int A */
PCI_INTB, /* PCI int B */
PCI_INTC, /* PCI int C */
PCI_INTD, /* PCI int D */
ATA, /* ATA */
FATA, /* CF */
POWER, /* Power swtich */
BUTTON, /* Button swtich */
};

__raw_writeb(__raw_readb(PA_IMASK) | value, PA_IMASK);
}
/* Vectors for LANDISK */
static struct intc_vect vectors_landisk[] __initdata = {
INTC_IRQ(PCI_INTA, IRQ_PCIINTA),
INTC_IRQ(PCI_INTB, IRQ_PCIINTB),
INTC_IRQ(PCI_INTC, IRQ_PCIINTC),
INTC_IRQ(PCI_INTD, IRQ_PCIINTD),
INTC_IRQ(ATA, IRQ_ATA),
INTC_IRQ(FATA, IRQ_FATA),
INTC_IRQ(POWER, IRQ_POWER),
INTC_IRQ(BUTTON, IRQ_BUTTON),
};

static struct irq_chip landisk_irq_chip __read_mostly = {
.name = "LANDISK",
.irq_mask = disable_landisk_irq,
.irq_unmask = enable_landisk_irq,
/* IRLMSK mask register layout for LANDISK */
static struct intc_mask_reg mask_registers_landisk[] __initdata = {
{ PA_IMASK, 0, 8, /* IRLMSK */
{ BUTTON, POWER, FATA, ATA,
PCI_INTD, PCI_INTC, PCI_INTB, PCI_INTA,
}
},
};

static DECLARE_INTC_DESC(intc_desc_landisk, "landisk", vectors_landisk, NULL,
mask_registers_landisk, NULL, NULL);
/*
* Initialize IRQ setting
*/
void __init init_landisk_IRQ(void)
{
int i;

for (i = 5; i < 14; i++) {
disable_irq_nosync(i);
set_irq_chip_and_handler_name(i, &landisk_irq_chip,
handle_level_irq, "level");
enable_landisk_irq(irq_get_irq_data(i));
}
register_intc_controller(&intc_desc_landisk);
__raw_writeb(0x00, PA_PWRINT_CLR);
}
4 changes: 1 addition & 3 deletions trunk/arch/sh/boards/mach-landisk/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include <mach-landisk/mach/iodata_landisk.h>
#include <asm/io.h>

void init_landisk_IRQ(void);

static void landisk_power_off(void)
{
__raw_writeb(0x01, PA_SHUTDOWN);
Expand Down Expand Up @@ -83,7 +81,7 @@ static int __init landisk_devices_setup(void)
ARRAY_SIZE(landisk_devices));
}

__initcall(landisk_devices_setup);
device_initcall(landisk_devices_setup);

static void __init landisk_setup(char **cmdline_p)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/mach-r2d/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static int __init rts7751r2d_devices_setup(void)
return platform_add_devices(rts7751r2d_devices,
ARRAY_SIZE(rts7751r2d_devices));
}
__initcall(rts7751r2d_devices_setup);
device_initcall(rts7751r2d_devices_setup);

static void rts7751r2d_power_off(void)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/boards/mach-sdk7786/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#include <linux/i2c.h>
#include <linux/irq.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <mach/fpga.h>
#include <mach/irq.h>
#include <asm/machvec.h>
#include <asm/heartbeat.h>
#include <asm/sizes.h>
#include <asm/clock.h>
#include <asm/clkdev.h>
#include <asm/reboot.h>
#include <asm/smp-ops.h>

Expand Down Expand Up @@ -135,7 +135,7 @@ static int __init sdk7786_devices_setup(void)

return sdk7786_i2c_setup();
}
__initcall(sdk7786_devices_setup);
device_initcall(sdk7786_devices_setup);

static int sdk7786_mode_pins(void)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/mach-se/7206/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int __init se7206_devices_setup(void)
{
return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices));
}
__initcall(se7206_devices_setup);
device_initcall(se7206_devices_setup);

static int se7206_mode_pins(void)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/mach-se/7751/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int __init se7751_devices_setup(void)
{
return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
}
__initcall(se7751_devices_setup);
device_initcall(se7751_devices_setup);

/*
* The Machine Vector
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/mach-sh03/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int __init sh03_devices_setup(void)

return platform_add_devices(sh03_devices, ARRAY_SIZE(sh03_devices));
}
__initcall(sh03_devices_setup);
device_initcall(sh03_devices_setup);

static struct sh_machine_vector mv_sh03 __initmv = {
.mv_name = "Interface (CTP/PCI-SH03)",
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/sh/boot/romimage/mmcif-sh7724.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#define HIZCRC 0xa405015c
#define DRVCRA 0xa405018a

enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT,
MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE };

/* SH7724 specific MMCIF loader
*
* loads the romImage from an MMC card starting from block 512
Expand Down Expand Up @@ -63,7 +60,9 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes)
mmcif_update_progress(MMCIF_PROGRESS_LOAD);

/* load kernel via MMCIF interface */
sh_mmcif_boot_slurp(MMCIF_BASE, buf, no_bytes);
sh_mmcif_boot_do_read(MMCIF_BASE, 512,
(no_bytes + SH_MMCIF_BBS - 1) / SH_MMCIF_BBS,
buf);

/* disable clock to the MMCIF hardware block */
__raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2);
Expand Down
11 changes: 1 addition & 10 deletions trunk/arch/sh/configs/sh7757lcr_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,15 @@ CONFIG_IPV6=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_FW_LOADER is not set
CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
CONFIG_NETDEVICES=y
CONFIG_PHYLIB=y
CONFIG_VITESSE_PHY=y
CONFIG_MDIO_BITBANG=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
CONFIG_SH_ETH=y
# CONFIG_NETDEV_10000 is not set
# CONFIG_WLAN is not set
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_MOUSE_PS2 is not set
# CONFIG_SERIO is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=2
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=3
CONFIG_SERIAL_SH_SCI_CONSOLE=y
Expand All @@ -63,7 +57,6 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
# CONFIG_USB_SUPPORT is not set
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_INOTIFY=y
CONFIG_ISO9660_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_KCORE=y
Expand All @@ -76,10 +69,8 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_ISO8859_1=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DETECT_SOFTLOCKUP is not set
# CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_FTRACE is not set
# CONFIG_CRYPTO_ANSI_CPRNG is not set
28 changes: 26 additions & 2 deletions trunk/arch/sh/drivers/pci/fixups-landisk.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* arch/sh/drivers/pci/ops-landisk.c
* arch/sh/drivers/pci/fixups-landisk.c
*
* PCI initialization for the I-O DATA Device, Inc. LANDISK board
*
* Copyright (C) 2006 kogiidena
* Copyright (C) 2010 Nobuhiro Iwamatsu
*
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
Expand All @@ -15,6 +16,9 @@
#include <linux/pci.h>
#include "pci-sh4.h"

#define PCIMCR_MRSET_OFF 0xBFFFFFFF
#define PCIMCR_RFSH_OFF 0xFFFFFFFB

int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
{
/*
Expand All @@ -26,9 +30,29 @@ int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
int irq = ((slot + pin - 1) & 0x3) + 5;

if ((slot | (pin - 1)) > 0x3) {
printk("PCI: Bad IRQ mapping request for slot %d pin %c\n",
printk(KERN_WARNING "PCI: Bad IRQ mapping request for slot %d pin %c\n",
slot, pin - 1 + 'A');
return -1;
}
return irq;
}

int pci_fixup_pcic(struct pci_channel *chan)
{
unsigned long bcr1, mcr;

bcr1 = __raw_readl(SH7751_BCR1);
bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */
pci_write_reg(chan, bcr1, SH4_PCIBCR1);

mcr = __raw_readl(SH7751_MCR);
mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF;
pci_write_reg(chan, mcr, SH4_PCIMCR);

pci_write_reg(chan, 0x0c000000, SH7751_PCICONF5);
pci_write_reg(chan, 0xd0000000, SH7751_PCICONF6);
pci_write_reg(chan, 0x0c000000, SH4_PCILAR0);
pci_write_reg(chan, 0x00000000, SH4_PCILAR1);

return 0;
}
Loading

0 comments on commit af81b38

Please sign in to comment.