Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67266
b: refs/heads/master
c: 33d71d2
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Aug 23, 2007
1 parent 4eb2023 commit c05048d
Show file tree
Hide file tree
Showing 17 changed files with 3,887 additions and 6 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: ed16c20da6f500bc2dfad933078d2987636a7b60
refs/heads/master: 33d71d26ba982f99b8cb76b86b2e1e0a0964a8ac
61 changes: 61 additions & 0 deletions trunk/arch/powerpc/platforms/chrp/gg2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* include/asm-ppc/gg2.h -- VLSI VAS96011/12 `Golden Gate 2' register definitions
*
* Copyright (C) 1997 Geert Uytterhoeven
*
* This file is based on the following documentation:
*
* The VAS96011/12 Chipset, Data Book, Edition 1.0
* VLSI Technology, Inc.
*
* 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.
*/

#ifndef _ASMPPC_GG2_H
#define _ASMPPC_GG2_H

/*
* Memory Map (CHRP mode)
*/

#define GG2_PCI_MEM_BASE 0xc0000000 /* Peripheral memory space */
#define GG2_ISA_MEM_BASE 0xf7000000 /* Peripheral memory alias */
#define GG2_ISA_IO_BASE 0xf8000000 /* Peripheral I/O space */
#define GG2_PCI_CONFIG_BASE 0xfec00000 /* PCI configuration space */
#define GG2_INT_ACK_SPECIAL 0xfec80000 /* Interrupt acknowledge and */
/* special PCI cycles */
#define GG2_ROM_BASE0 0xff000000 /* ROM bank 0 */
#define GG2_ROM_BASE1 0xff800000 /* ROM bank 1 */


/*
* GG2 specific PCI Registers
*/

extern void __iomem *gg2_pci_config_base; /* kernel virtual address */

#define GG2_PCI_BUSNO 0x40 /* Bus number */
#define GG2_PCI_SUBBUSNO 0x41 /* Subordinate bus number */
#define GG2_PCI_DISCCTR 0x42 /* Disconnect counter */
#define GG2_PCI_PPC_CTRL 0x50 /* PowerPC interface control register */
#define GG2_PCI_ADDR_MAP 0x5c /* Address map */
#define GG2_PCI_PCI_CTRL 0x60 /* PCI interface control register */
#define GG2_PCI_ROM_CTRL 0x70 /* ROM interface control register */
#define GG2_PCI_ROM_TIME 0x74 /* ROM timing */
#define GG2_PCI_CC_CTRL 0x80 /* Cache controller control register */
#define GG2_PCI_DRAM_BANK0 0x90 /* Control register for DRAM bank #0 */
#define GG2_PCI_DRAM_BANK1 0x94 /* Control register for DRAM bank #1 */
#define GG2_PCI_DRAM_BANK2 0x98 /* Control register for DRAM bank #2 */
#define GG2_PCI_DRAM_BANK3 0x9c /* Control register for DRAM bank #3 */
#define GG2_PCI_DRAM_BANK4 0xa0 /* Control register for DRAM bank #4 */
#define GG2_PCI_DRAM_BANK5 0xa4 /* Control register for DRAM bank #5 */
#define GG2_PCI_DRAM_TIME0 0xb0 /* Timing parameters set #0 */
#define GG2_PCI_DRAM_TIME1 0xb4 /* Timing parameters set #1 */
#define GG2_PCI_DRAM_CTRL 0xc0 /* DRAM control */
#define GG2_PCI_ERR_CTRL 0xd0 /* Error control register */
#define GG2_PCI_ERR_STATUS 0xd4 /* Error status register */
/* Cleared when read */

#endif /* _ASMPPC_GG2_H */
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/chrp/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
#include <asm/irq.h>
#include <asm/hydra.h>
#include <asm/prom.h>
#include <asm/gg2.h>
#include <asm/machdep.h>
#include <asm/sections.h>
#include <asm/pci-bridge.h>
#include <asm/grackle.h>
#include <asm/rtas.h>

#include "chrp.h"
#include "gg2.h"

/* LongTrail */
void __iomem *gg2_pci_config_base;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/chrp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/prom.h>
#include <asm/gg2.h>
#include <asm/pci-bridge.h>
#include <asm/dma.h>
#include <asm/machdep.h>
Expand All @@ -51,6 +50,7 @@
#include <asm/xmon.h>

#include "chrp.h"
#include "gg2.h"

void rtas_indicator_progress(char *, unsigned short);

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/embedded6xx/linkstation.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
#include <asm/time.h>
#include <asm/prom.h>
#include <asm/mpic.h>
#include <asm/mpc10x.h>
#include <asm/pci-bridge.h>

#include "mpc10x.h"

static struct mtd_partition linkstation_physmap_partitions[] = {
{
.name = "mtd_firmimg",
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/embedded6xx/ls_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
#include <asm/io.h>
#include <asm/mpc10x.h>
#include <asm/prom.h>
#include <asm/termbits.h>

#include "mpc10x.h"

static void __iomem *avr_addr;
static unsigned long avr_clock;

Expand Down
180 changes: 180 additions & 0 deletions trunk/arch/powerpc/platforms/embedded6xx/mpc10x.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
/*
* Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem
* ctlr/EPIC/etc.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __PPC_KERNEL_MPC10X_H
#define __PPC_KERNEL_MPC10X_H

#include <linux/pci_ids.h>
#include <asm/pci-bridge.h>

/*
* The values here don't completely map everything but should work in most
* cases.
*
* MAP A (PReP Map)
* Processor: 0x80000000 - 0x807fffff -> PCI I/O: 0x00000000 - 0x007fffff
* Processor: 0xc0000000 - 0xdfffffff -> PCI MEM: 0x00000000 - 0x1fffffff
* PCI MEM: 0x80000000 -> Processor System Memory: 0x00000000
* EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB)
*
* MAP B (CHRP Map)
* Processor: 0xfe000000 - 0xfebfffff -> PCI I/O: 0x00000000 - 0x00bfffff
* Processor: 0x80000000 - 0xbfffffff -> PCI MEM: 0x80000000 - 0xbfffffff
* PCI MEM: 0x00000000 -> Processor System Memory: 0x00000000
* EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB)
*/

/*
* Define the vendor/device IDs for the various bridges--should be added to
* <linux/pci_ids.h>
*/
#define MPC10X_BRIDGE_106 ((PCI_DEVICE_ID_MOTOROLA_MPC106 << 16) | \
PCI_VENDOR_ID_MOTOROLA)
#define MPC10X_BRIDGE_8240 ((0x0003 << 16) | PCI_VENDOR_ID_MOTOROLA)
#define MPC10X_BRIDGE_107 ((0x0004 << 16) | PCI_VENDOR_ID_MOTOROLA)
#define MPC10X_BRIDGE_8245 ((0x0006 << 16) | PCI_VENDOR_ID_MOTOROLA)

/* Define the type of map to use */
#define MPC10X_MEM_MAP_A 1
#define MPC10X_MEM_MAP_B 2

/* Map A (PReP Map) Defines */
#define MPC10X_MAPA_CNFG_ADDR 0x80000cf8
#define MPC10X_MAPA_CNFG_DATA 0x80000cfc

#define MPC10X_MAPA_ISA_IO_BASE 0x80000000
#define MPC10X_MAPA_ISA_MEM_BASE 0xc0000000
#define MPC10X_MAPA_DRAM_OFFSET 0x80000000

#define MPC10X_MAPA_PCI_INTACK_ADDR 0xbffffff0
#define MPC10X_MAPA_PCI_IO_START 0x00000000
#define MPC10X_MAPA_PCI_IO_END (0x00800000 - 1)
#define MPC10X_MAPA_PCI_MEM_START 0x00000000
#define MPC10X_MAPA_PCI_MEM_END (0x20000000 - 1)

#define MPC10X_MAPA_PCI_MEM_OFFSET (MPC10X_MAPA_ISA_MEM_BASE - \
MPC10X_MAPA_PCI_MEM_START)

/* Map B (CHRP Map) Defines */
#define MPC10X_MAPB_CNFG_ADDR 0xfec00000
#define MPC10X_MAPB_CNFG_DATA 0xfee00000

#define MPC10X_MAPB_ISA_IO_BASE 0xfe000000
#define MPC10X_MAPB_ISA_MEM_BASE 0x80000000
#define MPC10X_MAPB_DRAM_OFFSET 0x00000000

#define MPC10X_MAPB_PCI_INTACK_ADDR 0xfef00000
#define MPC10X_MAPB_PCI_IO_START 0x00000000
#define MPC10X_MAPB_PCI_IO_END (0x00c00000 - 1)
#define MPC10X_MAPB_PCI_MEM_START 0x80000000
#define MPC10X_MAPB_PCI_MEM_END (0xc0000000 - 1)

#define MPC10X_MAPB_PCI_MEM_OFFSET (MPC10X_MAPB_ISA_MEM_BASE - \
MPC10X_MAPB_PCI_MEM_START)

/* Set hose members to values appropriate for the mem map used */
#define MPC10X_SETUP_HOSE(hose, map) { \
(hose)->pci_mem_offset = MPC10X_MAP##map##_PCI_MEM_OFFSET; \
(hose)->io_space.start = MPC10X_MAP##map##_PCI_IO_START; \
(hose)->io_space.end = MPC10X_MAP##map##_PCI_IO_END; \
(hose)->mem_space.start = MPC10X_MAP##map##_PCI_MEM_START; \
(hose)->mem_space.end = MPC10X_MAP##map##_PCI_MEM_END; \
(hose)->io_base_virt = (void *)MPC10X_MAP##map##_ISA_IO_BASE; \
}


/* Miscellaneous Configuration register offsets */
#define MPC10X_CFG_PIR_REG 0x09
#define MPC10X_CFG_PIR_HOST_BRIDGE 0x00
#define MPC10X_CFG_PIR_AGENT 0x01

#define MPC10X_CFG_EUMBBAR 0x78

#define MPC10X_CFG_PICR1_REG 0xa8
#define MPC10X_CFG_PICR1_ADDR_MAP_MASK 0x00010000
#define MPC10X_CFG_PICR1_ADDR_MAP_A 0x00010000
#define MPC10X_CFG_PICR1_ADDR_MAP_B 0x00000000
#define MPC10X_CFG_PICR1_SPEC_PCI_RD 0x00000004
#define MPC10X_CFG_PICR1_ST_GATH_EN 0x00000040

#define MPC10X_CFG_PICR2_REG 0xac
#define MPC10X_CFG_PICR2_COPYBACK_OPT 0x00000001

#define MPC10X_CFG_MAPB_OPTIONS_REG 0xe0
#define MPC10X_CFG_MAPB_OPTIONS_CFAE 0x80 /* CPU_FD_ALIAS_EN */
#define MPC10X_CFG_MAPB_OPTIONS_PFAE 0x40 /* PCI_FD_ALIAS_EN */
#define MPC10X_CFG_MAPB_OPTIONS_DR 0x20 /* DLL_RESET */
#define MPC10X_CFG_MAPB_OPTIONS_PCICH 0x08 /* PCI_COMPATIBILITY_HOLE */
#define MPC10X_CFG_MAPB_OPTIONS_PROCCH 0x04 /* PROC_COMPATIBILITY_HOLE */

/* Define offsets for the memory controller registers in the config space */
#define MPC10X_MCTLR_MEM_START_1 0x80 /* Banks 0-3 */
#define MPC10X_MCTLR_MEM_START_2 0x84 /* Banks 4-7 */
#define MPC10X_MCTLR_EXT_MEM_START_1 0x88 /* Banks 0-3 */
#define MPC10X_MCTLR_EXT_MEM_START_2 0x8c /* Banks 4-7 */

#define MPC10X_MCTLR_MEM_END_1 0x90 /* Banks 0-3 */
#define MPC10X_MCTLR_MEM_END_2 0x94 /* Banks 4-7 */
#define MPC10X_MCTLR_EXT_MEM_END_1 0x98 /* Banks 0-3 */
#define MPC10X_MCTLR_EXT_MEM_END_2 0x9c /* Banks 4-7 */

#define MPC10X_MCTLR_MEM_BANK_ENABLES 0xa0

/* Define some offset in the EUMB */
#define MPC10X_EUMB_SIZE 0x00100000 /* Total EUMB size (1MB) */

#define MPC10X_EUMB_MU_OFFSET 0x00000000 /* Msg Unit reg offset */
#define MPC10X_EUMB_MU_SIZE 0x00001000 /* Msg Unit reg size */
#define MPC10X_EUMB_DMA_OFFSET 0x00001000 /* DMA Unit reg offset */
#define MPC10X_EUMB_DMA_SIZE 0x00001000 /* DMA Unit reg size */
#define MPC10X_EUMB_ATU_OFFSET 0x00002000 /* Addr xlate reg offset */
#define MPC10X_EUMB_ATU_SIZE 0x00001000 /* Addr xlate reg size */
#define MPC10X_EUMB_I2C_OFFSET 0x00003000 /* I2C Unit reg offset */
#define MPC10X_EUMB_I2C_SIZE 0x00001000 /* I2C Unit reg size */
#define MPC10X_EUMB_DUART_OFFSET 0x00004000 /* DUART Unit reg offset (8245) */
#define MPC10X_EUMB_DUART_SIZE 0x00001000 /* DUART Unit reg size (8245) */
#define MPC10X_EUMB_EPIC_OFFSET 0x00040000 /* EPIC offset in EUMB */
#define MPC10X_EUMB_EPIC_SIZE 0x00030000 /* EPIC size */
#define MPC10X_EUMB_PM_OFFSET 0x000fe000 /* Performance Monitor reg offset (8245) */
#define MPC10X_EUMB_PM_SIZE 0x00001000 /* Performance Monitor reg size (8245) */
#define MPC10X_EUMB_WP_OFFSET 0x000ff000 /* Data path diagnostic, watchpoint reg offset */
#define MPC10X_EUMB_WP_SIZE 0x00001000 /* Data path diagnostic, watchpoint reg size */

/*
* Define some recommended places to put the EUMB regs.
* For both maps, recommend putting the EUMB from 0xeff00000 to 0xefffffff.
*/
extern unsigned long ioremap_base;
#define MPC10X_MAPA_EUMB_BASE (ioremap_base - MPC10X_EUMB_SIZE)
#define MPC10X_MAPB_EUMB_BASE MPC10X_MAPA_EUMB_BASE

enum ppc_sys_devices {
MPC10X_IIC1,
MPC10X_DMA0,
MPC10X_DMA1,
MPC10X_UART0,
MPC10X_UART1,
NUM_PPC_SYS_DEVS,
};

int mpc10x_bridge_init(struct pci_controller *hose,
uint current_map,
uint new_map,
uint phys_eumb_base);
unsigned long mpc10x_get_mem_size(uint mem_map);
int mpc10x_enable_store_gathering(struct pci_controller *hose);
int mpc10x_disable_store_gathering(struct pci_controller *hose);

/* For MPC107 boards that use the built-in openpic */
void mpc10x_set_openpic(void);

#endif /* __PPC_KERNEL_MPC10X_H */
3 changes: 2 additions & 1 deletion trunk/drivers/macintosh/ans-lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
#include <asm/uaccess.h>
#include <asm/sections.h>
#include <asm/prom.h>
#include <asm/ans-lcd.h>
#include <asm/io.h>

#include "ans-lcd.h"

#define ANSLCD_ADDR 0xf301c000
#define ANSLCD_CTRL_IX 0x00
#define ANSLCD_DATA_IX 0x10
Expand Down
File renamed without changes.
Loading

0 comments on commit c05048d

Please sign in to comment.