162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * arch/arm/mach-footbridge/include/mach/hardware.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 1998-1999 Russell King. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * This file contains the hardware definitions of the EBSA-285. 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#ifndef __ASM_ARCH_HARDWARE_H 1062306a36Sopenharmony_ci#define __ASM_ARCH_HARDWARE_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* Virtual Physical Size 1362306a36Sopenharmony_ci * 0xff800000 0x40000000 1MB X-Bus 1462306a36Sopenharmony_ci * 0xff000000 0x7c000000 1MB PCI I/O space 1562306a36Sopenharmony_ci * 0xfe000000 0x42000000 1MB CSR 1662306a36Sopenharmony_ci * 0xfd000000 0x78000000 1MB Outbound write flush (not supported) 1762306a36Sopenharmony_ci * 0xfc000000 0x79000000 1MB PCI IACK/special space 1862306a36Sopenharmony_ci * 0xfb000000 0x7a000000 16MB PCI Config type 1 1962306a36Sopenharmony_ci * 0xfa000000 0x7b000000 16MB PCI Config type 0 2062306a36Sopenharmony_ci * 0xf9000000 0x50000000 1MB Cache flush 2162306a36Sopenharmony_ci * 0xf0000000 0x80000000 16MB ISA memory 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#define XBUS_SIZE 0x00100000 2562306a36Sopenharmony_ci#define XBUS_BASE 0xff800000 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci#define ARMCSR_SIZE 0x00100000 2862306a36Sopenharmony_ci#define ARMCSR_BASE 0xfe000000 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define WFLUSH_SIZE 0x00100000 3162306a36Sopenharmony_ci#define WFLUSH_BASE 0xfd000000 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#define PCIIACK_SIZE 0x00100000 3462306a36Sopenharmony_ci#define PCIIACK_BASE 0xfc000000 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define PCICFG1_SIZE 0x01000000 3762306a36Sopenharmony_ci#define PCICFG1_BASE 0xfb000000 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define PCICFG0_SIZE 0x01000000 4062306a36Sopenharmony_ci#define PCICFG0_BASE 0xfa000000 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#define PCIMEM_SIZE 0x01000000 4362306a36Sopenharmony_ci#define PCIMEM_BASE 0xf0000000 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define XBUS_CS2 0x40012000 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000)) 4862306a36Sopenharmony_ci#define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15) 4962306a36Sopenharmony_ci#define XBUS_SWITCH_J17_13 ((*XBUS_SWITCH) & (1 << 4)) 5062306a36Sopenharmony_ci#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5)) 5162306a36Sopenharmony_ci#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6)) 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108) /* CSR_ROMBASEMASK */ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci/* PIC irq control */ 5762306a36Sopenharmony_ci#define PIC_LO 0x20 5862306a36Sopenharmony_ci#define PIC_MASK_LO 0x21 5962306a36Sopenharmony_ci#define PIC_HI 0xA0 6062306a36Sopenharmony_ci#define PIC_MASK_HI 0xA1 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci/* GPIO pins */ 6362306a36Sopenharmony_ci#define GPIO_CCLK 0x800 6462306a36Sopenharmony_ci#define GPIO_DSCLK 0x400 6562306a36Sopenharmony_ci#define GPIO_E2CLK 0x200 6662306a36Sopenharmony_ci#define GPIO_IOLOAD 0x100 6762306a36Sopenharmony_ci#define GPIO_RED_LED 0x080 6862306a36Sopenharmony_ci#define GPIO_WDTIMER 0x040 6962306a36Sopenharmony_ci#define GPIO_DATA 0x020 7062306a36Sopenharmony_ci#define GPIO_IOCLK 0x010 7162306a36Sopenharmony_ci#define GPIO_DONE 0x008 7262306a36Sopenharmony_ci#define GPIO_FAN 0x004 7362306a36Sopenharmony_ci#define GPIO_GREEN_LED 0x002 7462306a36Sopenharmony_ci#define GPIO_RESET 0x001 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci/* CPLD pins */ 7762306a36Sopenharmony_ci#define CPLD_DS_ENABLE 8 7862306a36Sopenharmony_ci#define CPLD_7111_DISABLE 4 7962306a36Sopenharmony_ci#define CPLD_UNMUTE 2 8062306a36Sopenharmony_ci#define CPLD_FLASH_WR_ENABLE 1 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 8362306a36Sopenharmony_ciextern raw_spinlock_t nw_gpio_lock; 8462306a36Sopenharmony_ciextern void nw_gpio_modify_op(unsigned int mask, unsigned int set); 8562306a36Sopenharmony_ciextern void nw_gpio_modify_io(unsigned int mask, unsigned int in); 8662306a36Sopenharmony_ciextern unsigned int nw_gpio_read(void); 8762306a36Sopenharmony_ciextern void nw_cpld_modify(unsigned int mask, unsigned int set); 8862306a36Sopenharmony_ci#endif 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci#endif 91