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

Commit a967e127 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] 85xx: Enable CONFIG_SERIAL_8250_SHARE_IRQ
  [POWERPC] Select u-image as default image for Linkstation
  [POWERPC] 83xx: Minor fixes for 834x_mds USB setup code
  [POWERPC] Fix warning in powermac pci.c
  [POWERPC] Fix warning in powermac feature.c
  [POWERPC] Fix warning in prom_parse.c of_irq_map_oldworld()
  [POWERPC] Celleb: bug fix caused by not casting pointer types
  [POWERPC] Add missing newline in xmon help output
  [POWERPC] No DEEPNAP on 970MP 1.0
parents bb9b813b f194bda4
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -225,6 +225,22 @@ static struct cpu_spec cpu_specs[] = {
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "ppc970",
	},
	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00440100,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "ppc970",
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
+1 −1
Original line number Diff line number Diff line
@@ -916,7 +916,7 @@ EXPORT_SYMBOL_GPL(of_irq_map_raw);
static int of_irq_map_oldworld(struct device_node *device, int index,
			       struct of_irq *out_irq)
{
	const u32 *ints;
	const u32 *ints = NULL;
	int intlen;

	/*
+4 −4
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ static int mpc834x_usb_cfg(void)
	struct device_node *np = NULL;
	int port0_is_dr = 0;

	if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL)
	if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr")) != NULL)
		port0_is_dr = 1;
	if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){
	if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph")) != NULL){
		if (port0_is_dr) {
			printk(KERN_WARNING
				"There is only one USB port on PB board! \n");
@@ -103,8 +103,8 @@ static int mpc834x_usb_cfg(void)
		return -1;

	/*
	 * if MDS board is plug into PIB board,
	 * force to use the PHY on MDS board
	 * if Processor Board is plugged into PIB board,
	 * force to use the PHY on Processor Board
	 */
	bcsr5 = in_8(bcsr_regs + 5);
	if (!(bcsr5 & BCSR5_INT_USB))
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ config MPC85xx
	bool
	select PPC_UDBG_16550
	select PPC_INDIRECT_PCI
	select SERIAL_8250_SHARE_IRQ if SERIAL_8250
	default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS

config PPC_INDIRECT_PCI_BE
+61 −21
Original line number Diff line number Diff line
@@ -43,11 +43,34 @@

#define iob()  __asm__ __volatile__("eieio; sync":::"memory")

static inline volatile void __iomem *celleb_epci_get_epci_base(
					struct pci_controller *hose)
{
	/*
	 * Note:
	 * Celleb epci uses cfg_addr as a base address for
	 * epci control registers.
	 */

	return hose->cfg_addr;
}

static inline volatile void __iomem *celleb_epci_get_epci_cfg(
					struct pci_controller *hose)
{
	/*
	 * Note:
	 * Celleb epci uses cfg_data as a base address for
	 * configuration area for epci devices.
	 */

	return hose->cfg_data;
}

#if 0 /* test code for epci dummy read */
static void celleb_epci_dummy_read(struct pci_dev *dev)
{
	void __iomem *epci_base;
	volatile void __iomem *epci_base;
	struct device_node *node;
	struct pci_controller *hose;
	u32 val;
@@ -58,7 +81,7 @@ static void celleb_epci_dummy_read(struct pci_dev *dev)
	if (!hose)
		return;

	epci_base = hose->cfg_addr;
	epci_base = celleb_epci_get_epci_base(hose);

	val = in_be32(epci_base + SCC_EPCI_WATRP);
	iosync();
@@ -70,19 +93,20 @@ static void celleb_epci_dummy_read(struct pci_dev *dev)
static inline void clear_and_disable_master_abort_interrupt(
					struct pci_controller *hose)
{
	void __iomem *addr;
	addr = hose->cfg_addr + PCI_COMMAND;
	out_be32(addr, in_be32(addr) | (PCI_STATUS_REC_MASTER_ABORT << 16));
	volatile void __iomem *epci_base, *reg;
	epci_base = celleb_epci_get_epci_base(hose);
	reg = epci_base + PCI_COMMAND;
	out_be32(reg, in_be32(reg) | (PCI_STATUS_REC_MASTER_ABORT << 16));
}

static int celleb_epci_check_abort(struct pci_controller *hose,
				   void __iomem *addr)
				   volatile void __iomem *addr)
{
	void __iomem *reg, *epci_base;
	volatile void __iomem *reg, *epci_base;
	u32 val;

	iob();
	epci_base = hose->cfg_addr;
	epci_base = celleb_epci_get_epci_base(hose);

	reg = epci_base + PCI_COMMAND;
	val = in_be32(reg);
@@ -108,20 +132,21 @@ static int celleb_epci_check_abort(struct pci_controller *hose,
	return PCIBIOS_SUCCESSFUL;
}

static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose,
static volatile void __iomem *celleb_epci_make_config_addr(
					struct pci_controller *hose,
					unsigned int devfn, int where)
{
	void __iomem *addr;
	volatile void __iomem *addr;
	struct pci_bus *bus = hose->bus;

	if (bus->self)
		addr = hose->cfg_data +
		addr = celleb_epci_get_epci_cfg(hose) +
		       (((bus->number & 0xff) << 16)
		        | ((devfn & 0xff) << 8)
		        | (where & 0xff)
		        | 0x01000000);
	else
		addr = hose->cfg_data +
		addr = celleb_epci_get_epci_cfg(hose) +
		       (((devfn & 0xff) << 8) | (where & 0xff));

	pr_debug("EPCI: config_addr = 0x%p\n", addr);
@@ -132,7 +157,7 @@ static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose,
static int celleb_epci_read_config(struct pci_bus *bus,
			unsigned int devfn, int where, int size, u32 * val)
{
	void __iomem *addr;
	volatile void __iomem *epci_base, *addr;
	struct device_node *node;
	struct pci_controller *hose;

@@ -142,13 +167,14 @@ static int celleb_epci_read_config(struct pci_bus *bus,
	node = (struct device_node *)bus->sysdata;
	hose = pci_find_hose_for_OF_device(node);

	if (!hose->cfg_data)
	if (!celleb_epci_get_epci_cfg(hose))
		return PCIBIOS_DEVICE_NOT_FOUND;

	if (bus->number == hose->first_busno && devfn == 0) {
		/* EPCI controller self */

		addr = hose->cfg_addr + where;
		epci_base = celleb_epci_get_epci_base(hose);
		addr = epci_base + where;

		switch (size) {
		case 1:
@@ -185,7 +211,7 @@ static int celleb_epci_read_config(struct pci_bus *bus,
	}

	pr_debug("EPCI: "
		 "addr=0x%lx, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n",
		 "addr=0x%p, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n",
		 addr, devfn, where, size, *val);

	return celleb_epci_check_abort(hose, NULL);
@@ -194,7 +220,7 @@ static int celleb_epci_read_config(struct pci_bus *bus,
static int celleb_epci_write_config(struct pci_bus *bus,
			unsigned int devfn, int where, int size, u32 val)
{
	void __iomem *addr;
	volatile void __iomem *epci_base, *addr;
	struct device_node *node;
	struct pci_controller *hose;

@@ -204,13 +230,15 @@ static int celleb_epci_write_config(struct pci_bus *bus,
	node = (struct device_node *)bus->sysdata;
	hose = pci_find_hose_for_OF_device(node);

	if (!hose->cfg_data)

	if (!celleb_epci_get_epci_cfg(hose))
		return PCIBIOS_DEVICE_NOT_FOUND;

	if (bus->number == hose->first_busno && devfn == 0) {
		/* EPCI controller self */

		addr = hose->cfg_addr + where;
		epci_base = celleb_epci_get_epci_base(hose);
		addr = epci_base + where;

		switch (size) {
		case 1:
@@ -258,10 +286,10 @@ struct pci_ops celleb_epci_ops = {
static int __devinit celleb_epci_init(struct pci_controller *hose)
{
	u32 val;
	void __iomem *reg, *epci_base;
	volatile void __iomem *reg, *epci_base;
	int hwres = 0;

	epci_base = hose->cfg_addr;
	epci_base = celleb_epci_get_epci_base(hose);

	/* PCI core reset(Internal bus and PCI clock) */
	reg = epci_base + SCC_EPCI_CKCTRL;
@@ -382,6 +410,18 @@ int __devinit celleb_setup_epci(struct device_node *node,

	pr_debug("PCI: celleb_setup_epci()\n");

	/*
	 * Note:
	 * Celleb epci uses cfg_addr and cfg_data member of
	 * pci_controller structure in irregular way.
	 *
	 * cfg_addr is used to map for control registers of
	 * celleb epci.
	 *
	 * cfg_data is used for configuration area of devices
	 * on Celleb epci buses.
	 */

	if (of_address_to_resource(node, 0, &r))
		goto error;
	hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1));
Loading