M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,925 @@
/*
* SA-1101.h
*
* Copyright (c) Peter Danielsson 1999
*
* Definition of constants related to the sa1101
* support chip for the sa1100
*
*/
/* Be sure that virtual mapping is defined right */
#ifndef __ASM_ARCH_HARDWARE_H
#error You must include hardware.h not SA-1101.h
#endif
#ifndef SA1101_BASE
#error You must define SA-1101 physical base address
#endif
#ifndef LANGUAGE
# ifdef __ASSEMBLY__
# define LANGUAGE Assembly
# else
# define LANGUAGE C
# endif
#endif
/*
* We have mapped the sa1101 depending on the value of SA1101_BASE.
* It then appears from 0xf4000000.
*/
#define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xf4000000)
#define SA1101_v2p( x ) ((x) - 0xf4000000 + SA1101_BASE)
#ifndef SA1101_p2v
#define SA1101_p2v(PhAdd) (PhAdd)
#endif
#include <mach/bitfield.h>
#define C 0
#define Assembly 1
/*
* Memory map
*/
#define __SHMEM_CONTROL0 0x00000000
#define __SYSTEM_CONTROL1 0x00000400
#define __ARBITER 0x00020000
#define __SYSTEM_CONTROL2 0x00040000
#define __SYSTEM_CONTROL3 0x00060000
#define __PARALLEL_PORT 0x00080000
#define __VIDMEM_CONTROL 0x00100000
#define __UPDATE_FIFO 0x00120000
#define __SHMEM_CONTROL1 0x00140000
#define __INTERRUPT_CONTROL 0x00160000
#define __USB_CONTROL 0x00180000
#define __TRACK_INTERFACE 0x001a0000
#define __MOUSE_INTERFACE 0x001b0000
#define __KEYPAD_INTERFACE 0x001c0000
#define __PCMCIA_INTERFACE 0x001e0000
#define __VGA_CONTROL 0x00200000
#define __GPIO_INTERFACE 0x00300000
/*
* Macro that calculates real address for registers in the SA-1101
*/
#define _SA1101( x ) ((x) + SA1101_BASE)
/*
* Interface and shared memory controller registers
*
* Registers
* SKCR SA-1101 control register (read/write)
* SMCR Shared Memory Controller Register
* SNPR Snoop Register
*/
#define _SKCR _SA1101( 0x00000000 ) /* SA-1101 Control Reg. */
#define _SMCR _SA1101( 0x00140000 ) /* Shared Mem. Control Reg. */
#define _SNPR _SA1101( 0x00140400 ) /* Snoop Reg. */
#if LANGUAGE == C
#define SKCR (*((volatile Word *) SA1101_p2v (_SKCR)))
#define SMCR (*((volatile Word *) SA1101_p2v (_SMCR)))
#define SNPR (*((volatile Word *) SA1101_p2v (_SNPR)))
#define SKCR_PLLEn 0x0001 /* Enable On-Chip PLL */
#define SKCR_BCLKEn 0x0002 /* Enables BCLK */
#define SKCR_Sleep 0x0004 /* Sleep Mode */
#define SKCR_IRefEn 0x0008 /* DAC Iref input enable */
#define SKCR_VCOON 0x0010 /* VCO bias */
#define SKCR_ScanTestEn 0x0020 /* Enables scan test */
#define SKCR_ClockTestEn 0x0040 /* Enables clock test */
#define SMCR_DCAC Fld(2,0) /* Number of column address bits */
#define SMCR_DRAC Fld(2,2) /* Number of row address bits */
#define SMCR_ArbiterBias 0x0008 /* favor video or USB */
#define SMCR_TopVidMem Fld(4,5) /* Top 4 bits of vidmem addr. */
#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \
(( (x) - 8 ) << FShft (SMCR_DCAC))
#define SMCR_RowAdrBits( x ) /* row addr bits 9..12 */\
(( (x) - 9 ) << FShft (SMCR_DRAC))
#define SNPR_VFBstart Fld(12,0) /* Video frame buffer addr */
#define SNPR_VFBsize Fld(11,12) /* Video frame buffer size */
#define SNPR_WholeBank (1 << 23) /* Whole bank bit */
#define SNPR_BankSelect Fld(2,27) /* Bank select */
#define SNPR_SnoopEn (1 << 31) /* Enable snoop operation */
#define SNPR_Set_VFBsize( x ) /* set frame buffer size (in kb) */ \
( (x) << FShft (SNPR_VFBsize))
#define SNPR_Select_Bank(x) /* select bank 0 or 1 */ \
(( (x) + 1 ) << FShft (SNPR_BankSelect ))
#endif /* LANGUAGE == C */
/*
* Video Memory Controller
*
* Registers
* VMCCR Configuration register
* VMCAR VMC address register
* VMCDR VMC data register
*
*/
#define _VMCCR _SA1101( 0x00100000 ) /* Configuration register */
#define _VMCAR _SA1101( 0x00101000 ) /* VMC address register */
#define _VMCDR _SA1101( 0x00101400 ) /* VMC data register */
#if LANGUAGE == C
#define VMCCR (*((volatile Word *) SA1101_p2v (_VMCCR)))
#define VMCAR (*((volatile Word *) SA1101_p2v (_VMCAR)))
#define VMCDR (*((volatile Word *) SA1101_p2v (_VMCDR)))
#define VMCCR_RefreshEn 0x0000 /* Enable memory refresh */
#define VMCCR_Config 0x0001 /* DRAM size */
#define VMCCR_RefPeriod Fld(2,3) /* Refresh period */
#define VMCCR_StaleDataWait Fld(4,5) /* Stale FIFO data timeout counter */
#define VMCCR_SleepState (1<<9) /* State of interface pins in sleep*/
#define VMCCR_RefTest (1<<10) /* refresh test */
#define VMCCR_RefLow Fld(6,11) /* refresh low counter */
#define VMCCR_RefHigh Fld(7,17) /* refresh high counter */
#define VMCCR_SDTCTest Fld(7,24) /* stale data timeout counter */
#define VMCCR_ForceSelfRef (1<<31) /* Force self refresh */
#endif LANGUAGE == C
/* Update FIFO
*
* Registers
* UFCR Update FIFO Control Register
* UFSR Update FIFO Status Register
* UFLVLR update FIFO level register
* UFDR update FIFO data register
*/
#define _UFCR _SA1101(0x00120000) /* Update FIFO Control Reg. */
#define _UFSR _SA1101(0x00120400) /* Update FIFO Status Reg. */
#define _UFLVLR _SA1101(0x00120800) /* Update FIFO level reg. */
#define _UFDR _SA1101(0x00120c00) /* Update FIFO data reg. */
#if LANGUAGE == C
#define UFCR (*((volatile Word *) SA1101_p2v (_UFCR)))
#define UFSR (*((volatile Word *) SA1101_p2v (_UFSR)))
#define UFLVLR (*((volatile Word *) SA1101_p2v (_UFLVLR)))
#define UFDR (*((volatile Word *) SA1101_p2v (_UFDR)))
#define UFCR_FifoThreshhold Fld(7,0) /* Level for FifoGTn flag */
#define UFSR_FifoGTnFlag 0x01 /* FifoGTn flag */#define UFSR_FifoEmpty 0x80 /* FIFO is empty */
#endif /* LANGUAGE == C */
/* System Controller
*
* Registers
* SKPCR Power Control Register
* SKCDR Clock Divider Register
* DACDR1 DAC1 Data register
* DACDR2 DAC2 Data register
*/
#define _SKPCR _SA1101(0x00000400)
#define _SKCDR _SA1101(0x00040000)
#define _DACDR1 _SA1101(0x00060000)
#define _DACDR2 _SA1101(0x00060400)
#if LANGUAGE == C
#define SKPCR (*((volatile Word *) SA1101_p2v (_SKPCR)))
#define SKCDR (*((volatile Word *) SA1101_p2v (_SKCDR)))
#define DACDR1 (*((volatile Word *) SA1101_p2v (_DACDR1)))
#define DACDR2 (*((volatile Word *) SA1101_p2v (_DACDR2)))
#define SKPCR_UCLKEn 0x01 /* USB Enable */
#define SKPCR_PCLKEn 0x02 /* PS/2 Enable */
#define SKPCR_ICLKEn 0x04 /* Interrupt Controller Enable */
#define SKPCR_VCLKEn 0x08 /* Video Controller Enable */
#define SKPCR_PICLKEn 0x10 /* parallel port Enable */
#define SKPCR_DCLKEn 0x20 /* DACs Enable */
#define SKPCR_nKPADEn 0x40 /* Multiplexer */
#define SKCDR_PLLMul Fld(7,0) /* PLL Multiplier */
#define SKCDR_VCLKEn Fld(2,7) /* Video controller clock divider */
#define SKDCR_BCLKEn (1<<9) /* BCLK Divider */
#define SKDCR_UTESTCLKEn (1<<10) /* Route USB clock during test mode */
#define SKDCR_DivRValue Fld(6,11) /* Input clock divider for PLL */
#define SKDCR_DivNValue Fld(5,17) /* Output clock divider for PLL */
#define SKDCR_PLLRSH Fld(3,22) /* PLL bandwidth control */
#define SKDCR_ChargePump (1<<25) /* Charge pump control */
#define SKDCR_ClkTestMode (1<<26) /* Clock output test mode */
#define SKDCR_ClkTestEn (1<<27) /* Test clock generator */
#define SKDCR_ClkJitterCntl Fld(3,28) /* video clock jitter compensation */
#define DACDR_DACCount Fld(8,0) /* Count value */
#define DACDR1_DACCount DACDR_DACCount
#define DACDR2_DACCount DACDR_DACCount
#endif /* LANGUAGE == C */
/*
* Parallel Port Interface
*
* Registers
* IEEE_Config IEEE mode selection and programmable attributes
* IEEE_Control Controls the states of IEEE port control outputs
* IEEE_Data Forward transfer data register
* IEEE_Addr Forward transfer address register
* IEEE_Status Port IO signal status register
* IEEE_IntStatus Port interrupts status register
* IEEE_FifoLevels Rx and Tx FIFO interrupt generation levels
* IEEE_InitTime Forward timeout counter initial value
* IEEE_TimerStatus Forward timeout counter current value
* IEEE_FifoReset Reset forward transfer FIFO
* IEEE_ReloadValue Counter reload value
* IEEE_TestControl Control testmode
* IEEE_TestDataIn Test data register
* IEEE_TestDataInEn Enable test data
* IEEE_TestCtrlIn Test control signals
* IEEE_TestCtrlInEn Enable test control signals
* IEEE_TestDataStat Current data bus value
*
*/
/*
* The control registers are defined as offsets from a base address
*/
#define _IEEE( x ) _SA1101( (x) + __PARALLEL_PORT )
#define _IEEE_Config _IEEE( 0x0000 )
#define _IEEE_Control _IEEE( 0x0400 )
#define _IEEE_Data _IEEE( 0x4000 )
#define _IEEE_Addr _IEEE( 0x0800 )
#define _IEEE_Status _IEEE( 0x0c00 )
#define _IEEE_IntStatus _IEEE( 0x1000 )
#define _IEEE_FifoLevels _IEEE( 0x1400 )
#define _IEEE_InitTime _IEEE( 0x1800 )
#define _IEEE_TimerStatus _IEEE( 0x1c00 )
#define _IEEE_FifoReset _IEEE( 0x2000 )
#define _IEEE_ReloadValue _IEEE( 0x3c00 )
#define _IEEE_TestControl _IEEE( 0x2400 )
#define _IEEE_TestDataIn _IEEE( 0x2800 )
#define _IEEE_TestDataInEn _IEEE( 0x2c00 )
#define _IEEE_TestCtrlIn _IEEE( 0x3000 )
#define _IEEE_TestCtrlInEn _IEEE( 0x3400 )
#define _IEEE_TestDataStat _IEEE( 0x3800 )
#if LANGUAGE == C
#define IEEE_Config (*((volatile Word *) SA1101_p2v (_IEEE_Config)))
#define IEEE_Control (*((volatile Word *) SA1101_p2v (_IEEE_Control)))
#define IEEE_Data (*((volatile Word *) SA1101_p2v (_IEEE_Data)))
#define IEEE_Addr (*((volatile Word *) SA1101_p2v (_IEEE_Addr)))
#define IEEE_Status (*((volatile Word *) SA1101_p2v (_IEEE_Status)))
#define IEEE_IntStatus (*((volatile Word *) SA1101_p2v (_IEEE_IntStatus)))
#define IEEE_FifoLevels (*((volatile Word *) SA1101_p2v (_IEEE_FifoLevels)))
#define IEEE_InitTime (*((volatile Word *) SA1101_p2v (_IEEE_InitTime)))
#define IEEE_TimerStatus (*((volatile Word *) SA1101_p2v (_IEEE_TimerStatus)))
#define IEEE_FifoReset (*((volatile Word *) SA1101_p2v (_IEEE_FifoReset)))
#define IEEE_ReloadValue (*((volatile Word *) SA1101_p2v (_IEEE_ReloadValue)))
#define IEEE_TestControl (*((volatile Word *) SA1101_p2v (_IEEE_TestControl)))
#define IEEE_TestDataIn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataIn)))
#define IEEE_TestDataInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataInEn)))
#define IEEE_TestCtrlIn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlIn)))
#define IEEE_TestCtrlInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlInEn)))
#define IEEE_TestDataStat (*((volatile Word *) SA1101_p2v (_IEEE_TestDataStat)))
#define IEEE_Config_M Fld(3,0) /* Mode select */
#define IEEE_Config_D 0x04 /* FIFO access enable */
#define IEEE_Config_B 0x08 /* 9-bit word enable */
#define IEEE_Config_T 0x10 /* Data transfer enable */
#define IEEE_Config_A 0x20 /* Data transfer direction */
#define IEEE_Config_E 0x40 /* Timer enable */
#define IEEE_Control_A 0x08 /* AutoFd output */
#define IEEE_Control_E 0x04 /* Selectin output */
#define IEEE_Control_T 0x02 /* Strobe output */
#define IEEE_Control_I 0x01 /* Port init output */
#define IEEE_Data_C (1<<31) /* Byte count */
#define IEEE_Data_Db Fld(9,16) /* Data byte 2 */
#define IEEE_Data_Da Fld(9,0) /* Data byte 1 */
#define IEEE_Addr_A Fld(8,0) /* forward address transfer byte */
#define IEEE_Status_A 0x0100 /* nAutoFd port output status */
#define IEEE_Status_E 0x0080 /* nSelectIn port output status */
#define IEEE_Status_T 0x0040 /* nStrobe port output status */
#define IEEE_Status_I 0x0020 /* nInit port output status */
#define IEEE_Status_B 0x0010 /* Busy port inout status */
#define IEEE_Status_S 0x0008 /* Select port input status */
#define IEEE_Status_K 0x0004 /* nAck port input status */
#define IEEE_Status_F 0x0002 /* nFault port input status */
#define IEEE_Status_R 0x0001 /* pError port input status */
#define IEEE_IntStatus_IntReqDat 0x0100
#define IEEE_IntStatus_IntReqEmp 0x0080
#define IEEE_IntStatus_IntReqInt 0x0040
#define IEEE_IntStatus_IntReqRav 0x0020
#define IEEE_IntStatus_IntReqTim 0x0010
#define IEEE_IntStatus_RevAddrComp 0x0008
#define IEEE_IntStatus_RevDataComp 0x0004
#define IEEE_IntStatus_FwdAddrComp 0x0002
#define IEEE_IntStatus_FwdDataComp 0x0001
#define IEEE_FifoLevels_RevFifoLevel 2
#define IEEE_FifoLevels_FwdFifoLevel 1
#define IEEE_InitTime_TimValInit Fld(22,0)
#define IEEE_TimerStatus_TimValStat Fld(22,0)
#define IEEE_ReloadValue_Reload Fld(4,0)
#define IEEE_TestControl_RegClk 0x04
#define IEEE_TestControl_ClockSelect Fld(2,1)
#define IEEE_TestControl_TimerTestModeEn 0x01
#define IEEE_TestCtrlIn_PError 0x10
#define IEEE_TestCtrlIn_nFault 0x08
#define IEEE_TestCtrlIn_nAck 0x04
#define IEEE_TestCtrlIn_PSel 0x02
#define IEEE_TestCtrlIn_Busy 0x01
#endif /* LANGUAGE == C */
/*
* VGA Controller
*
* Registers
* VideoControl Video Control Register
* VgaTiming0 VGA Timing Register 0
* VgaTiming1 VGA Timing Register 1
* VgaTiming2 VGA Timing Register 2
* VgaTiming3 VGA Timing Register 3
* VgaBorder VGA Border Color Register
* VgaDBAR VGADMA Base Address Register
* VgaDCAR VGADMA Channel Current Address Register
* VgaStatus VGA Status Register
* VgaInterruptMask VGA Interrupt Mask Register
* VgaPalette VGA Palette Registers
* DacControl DAC Control Register
* VgaTest VGA Controller Test Register
*/
#define _VGA( x ) _SA1101( ( x ) + __VGA_CONTROL )
#define _VideoControl _VGA( 0x0000 )
#define _VgaTiming0 _VGA( 0x0400 )
#define _VgaTiming1 _VGA( 0x0800 )
#define _VgaTiming2 _VGA( 0x0c00 )
#define _VgaTiming3 _VGA( 0x1000 )
#define _VgaBorder _VGA( 0x1400 )
#define _VgaDBAR _VGA( 0x1800 )
#define _VgaDCAR _VGA( 0x1c00 )
#define _VgaStatus _VGA( 0x2000 )
#define _VgaInterruptMask _VGA( 0x2400 )
#define _VgaPalette _VGA( 0x40000 )
#define _DacControl _VGA( 0x3000 )
#define _VgaTest _VGA( 0x2c00 )
#if (LANGUAGE == C)
#define VideoControl (*((volatile Word *) SA1101_p2v (_VideoControl)))
#define VgaTiming0 (*((volatile Word *) SA1101_p2v (_VgaTiming0)))
#define VgaTiming1 (*((volatile Word *) SA1101_p2v (_VgaTiming1)))
#define VgaTiming2 (*((volatile Word *) SA1101_p2v (_VgaTiming2)))
#define VgaTiming3 (*((volatile Word *) SA1101_p2v (_VgaTiming3)))
#define VgaBorder (*((volatile Word *) SA1101_p2v (_VgaBorder)))
#define VgaDBAR (*((volatile Word *) SA1101_p2v (_VgaDBAR)))
#define VgaDCAR (*((volatile Word *) SA1101_p2v (_VgaDCAR)))
#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus)))
#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask)))
#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette)))
#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl)))
#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest)))
#define VideoControl_VgaEn 0x00000000
#define VideoControl_BGR 0x00000001
#define VideoControl_VCompVal Fld(2,2)
#define VideoControl_VgaReq Fld(4,4)
#define VideoControl_VBurstL Fld(4,8)
#define VideoControl_VMode (1<<12)
#define VideoControl_PalRead (1<<13)
#define VgaTiming0_PPL Fld(6,2)
#define VgaTiming0_HSW Fld(8,8)
#define VgaTiming0_HFP Fld(8,16)
#define VgaTiming0_HBP Fld(8,24)
#define VgaTiming1_LPS Fld(10,0)
#define VgaTiming1_VSW Fld(6,10)
#define VgaTiming1_VFP Fld(8,16)
#define VgaTiming1_VBP Fld(8,24)
#define VgaTiming2_IVS 0x01
#define VgaTiming2_IHS 0x02
#define VgaTiming2_CVS 0x04
#define VgaTiming2_CHS 0x08
#define VgaTiming3_HBS Fld(8,0)
#define VgaTiming3_HBE Fld(8,8)
#define VgaTiming3_VBS Fld(8,16)
#define VgaTiming3_VBE Fld(8,24)
#define VgaBorder_BCOL Fld(24,0)
#define VgaStatus_VFUF 0x01
#define VgaStatus_VNext 0x02
#define VgaStatus_VComp 0x04
#define VgaInterruptMask_VFUFMask 0x00
#define VgaInterruptMask_VNextMask 0x01
#define VgaInterruptMask_VCompMask 0x02
#define VgaPalette_R Fld(8,0)
#define VgaPalette_G Fld(8,8)
#define VgaPalette_B Fld(8,16)
#define DacControl_DACON 0x0001
#define DacControl_COMPON 0x0002
#define DacControl_PEDON 0x0004
#define DacControl_RTrim Fld(5,4)
#define DacControl_GTrim Fld(5,9)
#define DacControl_BTrim Fld(5,14)
#define VgaTest_TDAC 0x00
#define VgaTest_Datatest Fld(4,1)
#define VgaTest_DACTESTDAC 0x10
#define VgaTest_DACTESTOUT Fld(3,5)
#endif /* LANGUAGE == C */
/*
* USB Host Interface Controller
*
* Registers
* Revision
* Control
* CommandStatus
* InterruptStatus
* InterruptEnable
* HCCA
* PeriodCurrentED
* ControlHeadED
* BulkHeadED
* BulkCurrentED
* DoneHead
* FmInterval
* FmRemaining
* FmNumber
* PeriodicStart
* LSThreshold
* RhDescriptorA
* RhDescriptorB
* RhStatus
* RhPortStatus
* USBStatus
* USBReset
* USTAR
* USWER
* USRFR
* USNFR
* USTCSR
* USSR
*
*/
#define _USB( x ) _SA1101( ( x ) + __USB_CONTROL )
#define _Revision _USB( 0x0000 )
#define _Control _USB( 0x0888 )
#define _CommandStatus _USB( 0x0c00 )
#define _InterruptStatus _USB( 0x1000 )
#define _InterruptEnable _USB( 0x1400 )
#define _HCCA _USB( 0x1800 )
#define _PeriodCurrentED _USB( 0x1c00 )
#define _ControlHeadED _USB( 0x2000 )
#define _BulkHeadED _USB( 0x2800 )
#define _BulkCurrentED _USB( 0x2c00 )
#define _DoneHead _USB( 0x3000 )
#define _FmInterval _USB( 0x3400 )
#define _FmRemaining _USB( 0x3800 )
#define _FmNumber _USB( 0x3c00 )
#define _PeriodicStart _USB( 0x4000 )
#define _LSThreshold _USB( 0x4400 )
#define _RhDescriptorA _USB( 0x4800 )
#define _RhDescriptorB _USB( 0x4c00 )
#define _RhStatus _USB( 0x5000 )
#define _RhPortStatus _USB( 0x5400 )
#define _USBStatus _USB( 0x11800 )
#define _USBReset _USB( 0x11c00 )
#define _USTAR _USB( 0x10400 )
#define _USWER _USB( 0x10800 )
#define _USRFR _USB( 0x10c00 )
#define _USNFR _USB( 0x11000 )
#define _USTCSR _USB( 0x11400 )
#define _USSR _USB( 0x11800 )
#if (LANGUAGE == C)
#define Revision (*((volatile Word *) SA1101_p2v (_Revision)))
#define Control (*((volatile Word *) SA1101_p2v (_Control)))
#define CommandStatus (*((volatile Word *) SA1101_p2v (_CommandStatus)))
#define InterruptStatus (*((volatile Word *) SA1101_p2v (_InterruptStatus)))
#define InterruptEnable (*((volatile Word *) SA1101_p2v (_InterruptEnable)))
#define HCCA (*((volatile Word *) SA1101_p2v (_HCCA)))
#define PeriodCurrentED (*((volatile Word *) SA1101_p2v (_PeriodCurrentED)))
#define ControlHeadED (*((volatile Word *) SA1101_p2v (_ControlHeadED)))
#define BulkHeadED (*((volatile Word *) SA1101_p2v (_BulkHeadED)))
#define BulkCurrentED (*((volatile Word *) SA1101_p2v (_BulkCurrentED)))
#define DoneHead (*((volatile Word *) SA1101_p2v (_DoneHead)))
#define FmInterval (*((volatile Word *) SA1101_p2v (_FmInterval)))
#define FmRemaining (*((volatile Word *) SA1101_p2v (_FmRemaining)))
#define FmNumber (*((volatile Word *) SA1101_p2v (_FmNumber)))
#define PeriodicStart (*((volatile Word *) SA1101_p2v (_PeriodicStart)))
#define LSThreshold (*((volatile Word *) SA1101_p2v (_LSThreshold)))
#define RhDescriptorA (*((volatile Word *) SA1101_p2v (_RhDescriptorA)))
#define RhDescriptorB (*((volatile Word *) SA1101_p2v (_RhDescriptorB)))
#define RhStatus (*((volatile Word *) SA1101_p2v (_RhStatus)))
#define RhPortStatus (*((volatile Word *) SA1101_p2v (_RhPortStatus)))
#define USBStatus (*((volatile Word *) SA1101_p2v (_USBStatus)))
#define USBReset (*((volatile Word *) SA1101_p2v (_USBReset)))
#define USTAR (*((volatile Word *) SA1101_p2v (_USTAR)))
#define USWER (*((volatile Word *) SA1101_p2v (_USWER)))
#define USRFR (*((volatile Word *) SA1101_p2v (_USRFR)))
#define USNFR (*((volatile Word *) SA1101_p2v (_USNFR)))
#define USTCSR (*((volatile Word *) SA1101_p2v (_USTCSR)))
#define USSR (*((volatile Word *) SA1101_p2v (_USSR)))
#define USBStatus_IrqHciRmtWkp (1<<7)
#define USBStatus_IrqHciBuffAcc (1<<8)
#define USBStatus_nIrqHciM (1<<9)
#define USBStatus_nHciMFClr (1<<10)
#define USBReset_ForceIfReset 0x01
#define USBReset_ForceHcReset 0x02
#define USBReset_ClkGenReset 0x04
#define USTCR_RdBstCntrl Fld(3,0)
#define USTCR_ByteEnable Fld(4,3)
#define USTCR_WriteEn (1<<7)
#define USTCR_FifoCir (1<<8)
#define USTCR_TestXferSel (1<<9)
#define USTCR_FifoCirAtEnd (1<<10)
#define USTCR_nSimScaleDownClk (1<<11)
#define USSR_nAppMDEmpty 0x01
#define USSR_nAppMDFirst 0x02
#define USSR_nAppMDLast 0x04
#define USSR_nAppMDFull 0x08
#define USSR_nAppMAFull 0x10
#define USSR_XferReq 0x20
#define USSR_XferEnd 0x40
#endif /* LANGUAGE == C */
/*
* Interrupt Controller
*
* Registers
* INTTEST0 Test register 0
* INTTEST1 Test register 1
* INTENABLE0 Interrupt Enable register 0
* INTENABLE1 Interrupt Enable register 1
* INTPOL0 Interrupt Polarity selection 0
* INTPOL1 Interrupt Polarity selection 1
* INTTSTSEL Interrupt source selection
* INTSTATCLR0 Interrupt Status 0
* INTSTATCLR1 Interrupt Status 1
* INTSET0 Interrupt Set 0
* INTSET1 Interrupt Set 1
*/
#define _INT( x ) _SA1101( ( x ) + __INTERRUPT_CONTROL)
#define _INTTEST0 _INT( 0x1000 )
#define _INTTEST1 _INT( 0x1400 )
#define _INTENABLE0 _INT( 0x2000 )
#define _INTENABLE1 _INT( 0x2400 )
#define _INTPOL0 _INT( 0x3000 )
#define _INTPOL1 _INT( 0x3400 )
#define _INTTSTSEL _INT( 0x5000 )
#define _INTSTATCLR0 _INT( 0x6000 )
#define _INTSTATCLR1 _INT( 0x6400 )
#define _INTSET0 _INT( 0x7000 )
#define _INTSET1 _INT( 0x7400 )
#if ( LANGUAGE == C )
#define INTTEST0 (*((volatile Word *) SA1101_p2v (_INTTEST0)))
#define INTTEST1 (*((volatile Word *) SA1101_p2v (_INTTEST1)))
#define INTENABLE0 (*((volatile Word *) SA1101_p2v (_INTENABLE0)))
#define INTENABLE1 (*((volatile Word *) SA1101_p2v (_INTENABLE1)))
#define INTPOL0 (*((volatile Word *) SA1101_p2v (_INTPOL0)))
#define INTPOL1 (*((volatile Word *) SA1101_p2v (_INTPOL1)))
#define INTTSTSEL (*((volatile Word *) SA1101_p2v (_INTTSTSEL)))
#define INTSTATCLR0 (*((volatile Word *) SA1101_p2v (_INTSTATCLR0)))
#define INTSTATCLR1 (*((volatile Word *) SA1101_p2v (_INTSTATCLR1)))
#define INTSET0 (*((volatile Word *) SA1101_p2v (_INTSET0)))
#define INTSET1 (*((volatile Word *) SA1101_p2v (_INTSET1)))
#endif /* LANGUAGE == C */
/*
* PS/2 Trackpad and Mouse Interfaces
*
* Registers (prefix kbd applies to trackpad interface, mse to mouse)
* KBDCR Control Register
* KBDSTAT Status Register
* KBDDATA Transmit/Receive Data register
* KBDCLKDIV Clock Division Register
* KBDPRECNT Clock Precount Register
* KBDTEST1 Test register 1
* KBDTEST2 Test register 2
* KBDTEST3 Test register 3
* KBDTEST4 Test register 4
* MSECR
* MSESTAT
* MSEDATA
* MSECLKDIV
* MSEPRECNT
* MSETEST1
* MSETEST2
* MSETEST3
* MSETEST4
*
*/
#define _KBD( x ) _SA1101( ( x ) + __TRACK_INTERFACE )
#define _MSE( x ) _SA1101( ( x ) + __MOUSE_INTERFACE )
#define _KBDCR _KBD( 0x0000 )
#define _KBDSTAT _KBD( 0x0400 )
#define _KBDDATA _KBD( 0x0800 )
#define _KBDCLKDIV _KBD( 0x0c00 )
#define _KBDPRECNT _KBD( 0x1000 )
#define _KBDTEST1 _KBD( 0x2000 )
#define _KBDTEST2 _KBD( 0x2400 )
#define _KBDTEST3 _KBD( 0x2800 )
#define _KBDTEST4 _KBD( 0x2c00 )
#define _MSECR _MSE( 0x0000 )
#define _MSESTAT _MSE( 0x0400 )
#define _MSEDATA _MSE( 0x0800 )
#define _MSECLKDIV _MSE( 0x0c00 )
#define _MSEPRECNT _MSE( 0x1000 )
#define _MSETEST1 _MSE( 0x2000 )
#define _MSETEST2 _MSE( 0x2400 )
#define _MSETEST3 _MSE( 0x2800 )
#define _MSETEST4 _MSE( 0x2c00 )
#if ( LANGUAGE == C )
#define KBDCR (*((volatile Word *) SA1101_p2v (_KBDCR)))
#define KBDSTAT (*((volatile Word *) SA1101_p2v (_KBDSTAT)))
#define KBDDATA (*((volatile Word *) SA1101_p2v (_KBDDATA)))
#define KBDCLKDIV (*((volatile Word *) SA1101_p2v (_KBDCLKDIV)))
#define KBDPRECNT (*((volatile Word *) SA1101_p2v (_KBDPRECNT)))
#define KBDTEST1 (*((volatile Word *) SA1101_p2v (_KBDTEST1)))
#define KBDTEST2 (*((volatile Word *) SA1101_p2v (_KBDTEST2)))
#define KBDTEST3 (*((volatile Word *) SA1101_p2v (_KBDTEST3)))
#define KBDTEST4 (*((volatile Word *) SA1101_p2v (_KBDTEST4)))
#define MSECR (*((volatile Word *) SA1101_p2v (_MSECR)))
#define MSESTAT (*((volatile Word *) SA1101_p2v (_MSESTAT)))
#define MSEDATA (*((volatile Word *) SA1101_p2v (_MSEDATA)))
#define MSECLKDIV (*((volatile Word *) SA1101_p2v (_MSECLKDIV)))
#define MSEPRECNT (*((volatile Word *) SA1101_p2v (_MSEPRECNT)))
#define MSETEST1 (*((volatile Word *) SA1101_p2v (_MSETEST1)))
#define MSETEST2 (*((volatile Word *) SA1101_p2v (_MSETEST2)))
#define MSETEST3 (*((volatile Word *) SA1101_p2v (_MSETEST3)))
#define MSETEST4 (*((volatile Word *) SA1101_p2v (_MSETEST4)))
#define KBDCR_ENA 0x08
#define KBDCR_FKD 0x02
#define KBDCR_FKC 0x01
#define KBDSTAT_TXE 0x80
#define KBDSTAT_TXB 0x40
#define KBDSTAT_RXF 0x20
#define KBDSTAT_RXB 0x10
#define KBDSTAT_ENA 0x08
#define KBDSTAT_RXP 0x04
#define KBDSTAT_KBD 0x02
#define KBDSTAT_KBC 0x01
#define KBDCLKDIV_DivVal Fld(4,0)
#define MSECR_ENA 0x08
#define MSECR_FKD 0x02
#define MSECR_FKC 0x01
#define MSESTAT_TXE 0x80
#define MSESTAT_TXB 0x40
#define MSESTAT_RXF 0x20
#define MSESTAT_RXB 0x10
#define MSESTAT_ENA 0x08
#define MSESTAT_RXP 0x04
#define MSESTAT_MSD 0x02
#define MSESTAT_MSC 0x01
#define MSECLKDIV_DivVal Fld(4,0)
#define KBDTEST1_CD 0x80
#define KBDTEST1_RC1 0x40
#define KBDTEST1_MC 0x20
#define KBDTEST1_C Fld(2,3)
#define KBDTEST1_T2 0x40
#define KBDTEST1_T1 0x20
#define KBDTEST1_T0 0x10
#define KBDTEST2_TICBnRES 0x08
#define KBDTEST2_RKC 0x04
#define KBDTEST2_RKD 0x02
#define KBDTEST2_SEL 0x01
#define KBDTEST3_ms_16 0x80
#define KBDTEST3_us_64 0x40
#define KBDTEST3_us_16 0x20
#define KBDTEST3_DIV8 0x10
#define KBDTEST3_DIn 0x08
#define KBDTEST3_CIn 0x04
#define KBDTEST3_KD 0x02
#define KBDTEST3_KC 0x01
#define KBDTEST4_BC12 0x80
#define KBDTEST4_BC11 0x40
#define KBDTEST4_TRES 0x20
#define KBDTEST4_CLKOE 0x10
#define KBDTEST4_CRES 0x08
#define KBDTEST4_RXB 0x04
#define KBDTEST4_TXB 0x02
#define KBDTEST4_SRX 0x01
#define MSETEST1_CD 0x80
#define MSETEST1_RC1 0x40
#define MSETEST1_MC 0x20
#define MSETEST1_C Fld(2,3)
#define MSETEST1_T2 0x40
#define MSETEST1_T1 0x20
#define MSETEST1_T0 0x10
#define MSETEST2_TICBnRES 0x08
#define MSETEST2_RKC 0x04
#define MSETEST2_RKD 0x02
#define MSETEST2_SEL 0x01
#define MSETEST3_ms_16 0x80
#define MSETEST3_us_64 0x40
#define MSETEST3_us_16 0x20
#define MSETEST3_DIV8 0x10
#define MSETEST3_DIn 0x08
#define MSETEST3_CIn 0x04
#define MSETEST3_KD 0x02
#define MSETEST3_KC 0x01
#define MSETEST4_BC12 0x80
#define MSETEST4_BC11 0x40
#define MSETEST4_TRES 0x20
#define MSETEST4_CLKOE 0x10
#define MSETEST4_CRES 0x08
#define MSETEST4_RXB 0x04
#define MSETEST4_TXB 0x02
#define MSETEST4_SRX 0x01
#endif /* LANGUAGE == C */
/*
* General-Purpose I/O Interface
*
* Registers
* PADWR Port A Data Write Register
* PBDWR Port B Data Write Register
* PADRR Port A Data Read Register
* PBDRR Port B Data Read Register
* PADDR Port A Data Direction Register
* PBDDR Port B Data Direction Register
* PASSR Port A Sleep State Register
* PBSSR Port B Sleep State Register
*
*/
#define _PIO( x ) _SA1101( ( x ) + __GPIO_INTERFACE )
#define _PADWR _PIO( 0x0000 )
#define _PBDWR _PIO( 0x0400 )
#define _PADRR _PIO( 0x0000 )
#define _PBDRR _PIO( 0x0400 )
#define _PADDR _PIO( 0x0800 )
#define _PBDDR _PIO( 0x0c00 )
#define _PASSR _PIO( 0x1000 )
#define _PBSSR _PIO( 0x1400 )
#if ( LANGUAGE == C )
#define PADWR (*((volatile Word *) SA1101_p2v (_PADWR)))
#define PBDWR (*((volatile Word *) SA1101_p2v (_PBDWR)))
#define PADRR (*((volatile Word *) SA1101_p2v (_PADRR)))
#define PBDRR (*((volatile Word *) SA1101_p2v (_PBDRR)))
#define PADDR (*((volatile Word *) SA1101_p2v (_PADDR)))
#define PBDDR (*((volatile Word *) SA1101_p2v (_PBDDR)))
#define PASSR (*((volatile Word *) SA1101_p2v (_PASSR)))
#define PBSSR (*((volatile Word *) SA1101_p2v (_PBSSR)))
#endif
/*
* Keypad Interface
*
* Registers
* PXDWR
* PXDRR
* PYDWR
* PYDRR
*
*/
#define _KEYPAD( x ) _SA1101( ( x ) + __KEYPAD_INTERFACE )
#define _PXDWR _KEYPAD( 0x0000 )
#define _PXDRR _KEYPAD( 0x0000 )
#define _PYDWR _KEYPAD( 0x0400 )
#define _PYDRR _KEYPAD( 0x0400 )
#if ( LANGUAGE == C )
#define PXDWR (*((volatile Word *) SA1101_p2v (_PXDWR)))
#define PXDRR (*((volatile Word *) SA1101_p2v (_PXDRR)))
#define PYDWR (*((volatile Word *) SA1101_p2v (_PYDWR)))
#define PYDRR (*((volatile Word *) SA1101_p2v (_PYDRR)))
#endif
/*
* PCMCIA Interface
*
* Registers
* PCSR Status Register
* PCCR Control Register
* PCSSR Sleep State Register
*
*/
#define _CARD( x ) _SA1101( ( x ) + __PCMCIA_INTERFACE )
#define _PCSR _CARD( 0x0000 )
#define _PCCR _CARD( 0x0400 )
#define _PCSSR _CARD( 0x0800 )
#if ( LANGUAGE == C )
#define PCSR (*((volatile Word *) SA1101_p2v (_PCSR)))
#define PCCR (*((volatile Word *) SA1101_p2v (_PCCR)))
#define PCSSR (*((volatile Word *) SA1101_p2v (_PCSSR)))
#define PCSR_S0_ready 0x0001
#define PCSR_S1_ready 0x0002
#define PCSR_S0_detected 0x0004
#define PCSR_S1_detected 0x0008
#define PCSR_S0_VS1 0x0010
#define PCSR_S0_VS2 0x0020
#define PCSR_S1_VS1 0x0040
#define PCSR_S1_VS2 0x0080
#define PCSR_S0_WP 0x0100
#define PCSR_S1_WP 0x0200
#define PCSR_S0_BVD1_nSTSCHG 0x0400
#define PCSR_S0_BVD2_nSPKR 0x0800
#define PCSR_S1_BVD1_nSTSCHG 0x1000
#define PCSR_S1_BVD2_nSPKR 0x2000
#define PCCR_S0_VPP0 0x0001
#define PCCR_S0_VPP1 0x0002
#define PCCR_S0_VCC0 0x0004
#define PCCR_S0_VCC1 0x0008
#define PCCR_S1_VPP0 0x0010
#define PCCR_S1_VPP1 0x0020
#define PCCR_S1_VCC0 0x0040
#define PCCR_S1_VCC1 0x0080
#define PCCR_S0_reset 0x0100
#define PCCR_S1_reset 0x0200
#define PCCR_S0_float 0x0400
#define PCCR_S1_float 0x0800
#define PCSSR_S0_VCC0 0x0001
#define PCSSR_S0_VCC1 0x0002
#define PCSSR_S0_VPP0 0x0004
#define PCSSR_S0_VPP1 0x0008
#define PCSSR_S0_control 0x0010
#define PCSSR_S1_VCC0 0x0020
#define PCSSR_S1_VCC1 0x0040
#define PCSSR_S1_VPP0 0x0080
#define PCSSR_S1_VPP1 0x0100
#define PCSSR_S1_control 0x0200
#endif
#undef C
#undef Assembly
@@ -0,0 +1,5 @@
/*
* Moved to new location
*/
#warning using old SA-1111.h - update to <asm/hardware/sa1111.h>
#include <asm/hardware/sa1111.h>
@@ -0,0 +1,102 @@
/*
* arch/arm/mach-sa1100/include/mach/assabet.h
*
* Created 2000/06/05 by Nicolas Pitre <nico@fluxnic.net>
*
* This file contains the hardware specific definitions for Assabet
* Only include this file from SA1100-specific files.
*
* 2000/05/23 John Dorsey <john+@cs.cmu.edu>
* Definitions for Neponset added.
*/
#ifndef __ASM_ARCH_ASSABET_H
#define __ASM_ARCH_ASSABET_H
/* System Configuration Register flags */
#define ASSABET_SCR_SDRAM_LOW (1<<2) /* SDRAM size (low bit) */
#define ASSABET_SCR_SDRAM_HIGH (1<<3) /* SDRAM size (high bit) */
#define ASSABET_SCR_FLASH_LOW (1<<4) /* Flash size (low bit) */
#define ASSABET_SCR_FLASH_HIGH (1<<5) /* Flash size (high bit) */
#define ASSABET_SCR_GFX (1<<8) /* Graphics Accelerator (0 = present) */
#define ASSABET_SCR_SA1111 (1<<9) /* Neponset (0 = present) */
#define ASSABET_SCR_INIT -1
extern unsigned long SCR_value;
#ifdef CONFIG_ASSABET_NEPONSET
#define machine_has_neponset() ((SCR_value & ASSABET_SCR_SA1111) == 0)
#else
#define machine_has_neponset() (0)
#endif
/* Board Control Register */
#define ASSABET_BCR_BASE 0xf1000000
#define ASSABET_BCR (*(volatile unsigned int *)(ASSABET_BCR_BASE))
#define ASSABET_BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */
#define ASSABET_BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */
#define ASSABET_BCR_GFX_RST (1<<1) /* Graphics Accelerator Reset (0 = hold reset) */
#define ASSABET_BCR_CODEC_RST (1<<2) /* 0 = Holds UCB1300, ADI7171, and UDA1341 in reset */
#define ASSABET_BCR_IRDA_FSEL (1<<3) /* IRDA Frequency select (0 = SIR, 1 = MIR/ FIR) */
#define ASSABET_BCR_IRDA_MD0 (1<<4) /* Range/Power select */
#define ASSABET_BCR_IRDA_MD1 (1<<5) /* Range/Power select */
#define ASSABET_BCR_STEREO_LB (1<<6) /* Stereo Loopback */
#define ASSABET_BCR_CF_BUS_OFF (1<<7) /* Compact Flash bus (0 = on, 1 = off (float)) */
#define ASSABET_BCR_AUDIO_ON (1<<8) /* Audio power on */
#define ASSABET_BCR_LIGHT_ON (1<<9) /* Backlight */
#define ASSABET_BCR_LCD_12RGB (1<<10) /* 0 = 16RGB, 1 = 12RGB */
#define ASSABET_BCR_LCD_ON (1<<11) /* LCD power on */
#define ASSABET_BCR_RS232EN (1<<12) /* RS232 transceiver enable */
#define ASSABET_BCR_LED_RED (1<<13) /* D9 (0 = on, 1 = off) */
#define ASSABET_BCR_LED_GREEN (1<<14) /* D8 (0 = on, 1 = off) */
#define ASSABET_BCR_VIB_ON (1<<15) /* Vibration motor (quiet alert) */
#define ASSABET_BCR_COM_DTR (1<<16) /* COMport Data Terminal Ready */
#define ASSABET_BCR_COM_RTS (1<<17) /* COMport Request To Send */
#define ASSABET_BCR_RAD_WU (1<<18) /* Radio wake up interrupt */
#define ASSABET_BCR_SMB_EN (1<<19) /* System management bus enable */
#define ASSABET_BCR_TV_IR_DEC (1<<20) /* TV IR Decode Enable (not implemented) */
#define ASSABET_BCR_QMUTE (1<<21) /* Quick Mute */
#define ASSABET_BCR_RAD_ON (1<<22) /* Radio Power On */
#define ASSABET_BCR_SPK_OFF (1<<23) /* 1 = Speaker amplifier power off */
#ifdef CONFIG_SA1100_ASSABET
extern void ASSABET_BCR_frob(unsigned int mask, unsigned int set);
#else
#define ASSABET_BCR_frob(x,y) do { } while (0)
#endif
#define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x))
#define ASSABET_BCR_clear(x) ASSABET_BCR_frob((x), 0)
#define ASSABET_BSR_BASE 0xf1000000
#define ASSABET_BSR (*(volatile unsigned int*)(ASSABET_BSR_BASE))
#define ASSABET_BSR_RS232_VALID (1 << 24)
#define ASSABET_BSR_COM_DCD (1 << 25)
#define ASSABET_BSR_COM_CTS (1 << 26)
#define ASSABET_BSR_COM_DSR (1 << 27)
#define ASSABET_BSR_RAD_CTS (1 << 28)
#define ASSABET_BSR_RAD_DSR (1 << 29)
#define ASSABET_BSR_RAD_DCD (1 << 30)
#define ASSABET_BSR_RAD_RI (1 << 31)
/* GPIOs (bitmasks) for which the generic definition doesn't say much */
#define ASSABET_GPIO_RADIO_IRQ GPIO_GPIO (14) /* Radio interrupt request */
#define ASSABET_GPIO_PS_MODE_SYNC GPIO_GPIO (16) /* Power supply mode/sync */
#define ASSABET_GPIO_STEREO_64FS_CLK GPIO_GPIO (19) /* SSP UDA1341 clock input */
#define ASSABET_GPIO_GFX_IRQ GPIO_GPIO (24) /* Graphics IRQ */
#define ASSABET_GPIO_BATT_LOW GPIO_GPIO (26) /* Low battery */
#define ASSABET_GPIO_RCLK GPIO_GPIO (26) /* CCLK/2 */
/* These are gpiolib GPIO numbers, not bitmasks */
#define ASSABET_GPIO_CF_IRQ 21 /* CF IRQ */
#define ASSABET_GPIO_CF_CD 22 /* CF CD */
#define ASSABET_GPIO_CF_BVD2 24 /* CF BVD / IOSPKR */
#define ASSABET_GPIO_CF_BVD1 25 /* CF BVD / IOSTSCHG */
#endif
@@ -0,0 +1,75 @@
/*
* arch/arm/mach-sa1100/include/mach/badge4.h
*
* Tim Connors <connors@hpl.hp.com>
* Christopher Hoover <ch@hpl.hp.com>
*
* Copyright (C) 2002 Hewlett-Packard Company
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __ASM_ARCH_HARDWARE_H
#error "include <mach/hardware.h> instead"
#endif
#define BADGE4_SA1111_BASE (0x48000000)
/* GPIOs on the BadgePAD 4 */
#define BADGE4_GPIO_INT_1111 GPIO_GPIO0 /* SA-1111 IRQ */
#define BADGE4_GPIO_INT_VID GPIO_GPIO1 /* Video expansion */
#define BADGE4_GPIO_LGP2 GPIO_GPIO2 /* GPIO_LDD8 */
#define BADGE4_GPIO_LGP3 GPIO_GPIO3 /* GPIO_LDD9 */
#define BADGE4_GPIO_LGP4 GPIO_GPIO4 /* GPIO_LDD10 */
#define BADGE4_GPIO_LGP5 GPIO_GPIO5 /* GPIO_LDD11 */
#define BADGE4_GPIO_LGP6 GPIO_GPIO6 /* GPIO_LDD12 */
#define BADGE4_GPIO_LGP7 GPIO_GPIO7 /* GPIO_LDD13 */
#define BADGE4_GPIO_LGP8 GPIO_GPIO8 /* GPIO_LDD14 */
#define BADGE4_GPIO_LGP9 GPIO_GPIO9 /* GPIO_LDD15 */
#define BADGE4_GPIO_GPA_VID GPIO_GPIO10 /* Video expansion */
#define BADGE4_GPIO_GPB_VID GPIO_GPIO11 /* Video expansion */
#define BADGE4_GPIO_GPC_VID GPIO_GPIO12 /* Video expansion */
#define BADGE4_GPIO_UART_HS1 GPIO_GPIO13
#define BADGE4_GPIO_UART_HS2 GPIO_GPIO14
#define BADGE4_GPIO_MUXSEL0 GPIO_GPIO15
#define BADGE4_GPIO_TESTPT_J7 GPIO_GPIO16
#define BADGE4_GPIO_SDSDA GPIO_GPIO17 /* SDRAM SPD Data */
#define BADGE4_GPIO_SDSCL GPIO_GPIO18 /* SDRAM SPD Clock */
#define BADGE4_GPIO_SDTYP0 GPIO_GPIO19 /* SDRAM Type Control */
#define BADGE4_GPIO_SDTYP1 GPIO_GPIO20 /* SDRAM Type Control */
#define BADGE4_GPIO_BGNT_1111 GPIO_GPIO21 /* GPIO_MBGNT */
#define BADGE4_GPIO_BREQ_1111 GPIO_GPIO22 /* GPIO_TREQA */
#define BADGE4_GPIO_TESTPT_J6 GPIO_GPIO23
#define BADGE4_GPIO_PCMEN5V GPIO_GPIO24 /* 5V power */
#define BADGE4_GPIO_SA1111_NRST GPIO_GPIO25 /* SA-1111 nRESET */
#define BADGE4_GPIO_TESTPT_J5 GPIO_GPIO26
#define BADGE4_GPIO_CLK_1111 GPIO_GPIO27 /* GPIO_32_768kHz */
/* Interrupts on the BadgePAD 4 */
#define BADGE4_IRQ_GPIO_SA1111 IRQ_GPIO0 /* SA-1111 interrupt */
/* PCM5ENV Usage tracking */
#define BADGE4_5V_PCMCIA_SOCK0 (1<<0)
#define BADGE4_5V_PCMCIA_SOCK1 (1<<1)
#define BADGE4_5V_PCMCIA_SOCK(n) (1<<(n))
#define BADGE4_5V_USB (1<<2)
#define BADGE4_5V_INITIALLY (1<<3)
#ifndef __ASSEMBLY__
extern void badge4_set_5V(unsigned subsystem, int on);
#endif
@@ -0,0 +1,113 @@
/*
* FILE bitfield.h
*
* Version 1.1
* Author Copyright (c) Marc A. Viredaz, 1998
* DEC Western Research Laboratory, Palo Alto, CA
* Date April 1998 (April 1997)
* System Advanced RISC Machine (ARM)
* Language C or ARM Assembly
* Purpose Definition of macros to operate on bit fields.
*/
#ifndef __BITFIELD_H
#define __BITFIELD_H
#ifndef __ASSEMBLY__
#define UData(Data) ((unsigned long) (Data))
#else
#define UData(Data) (Data)
#endif
/*
* MACRO: Fld
*
* Purpose
* The macro "Fld" encodes a bit field, given its size and its shift value
* with respect to bit 0.
*
* Note
* A more intuitive way to encode bit fields would have been to use their
* mask. However, extracting size and shift value information from a bit
* field's mask is cumbersome and might break the assembler (255-character
* line-size limit).
*
* Input
* Size Size of the bit field, in number of bits.
* Shft Shift value of the bit field with respect to bit 0.
*
* Output
* Fld Encoded bit field.
*/
#define Fld(Size, Shft) (((Size) << 16) + (Shft))
/*
* MACROS: FSize, FShft, FMsk, FAlnMsk, F1stBit
*
* Purpose
* The macros "FSize", "FShft", "FMsk", "FAlnMsk", and "F1stBit" return
* the size, shift value, mask, aligned mask, and first bit of a
* bit field.
*
* Input
* Field Encoded bit field (using the macro "Fld").
*
* Output
* FSize Size of the bit field, in number of bits.
* FShft Shift value of the bit field with respect to bit 0.
* FMsk Mask for the bit field.
* FAlnMsk Mask for the bit field, aligned on bit 0.
* F1stBit First bit of the bit field.
*/
#define FSize(Field) ((Field) >> 16)
#define FShft(Field) ((Field) & 0x0000FFFF)
#define FMsk(Field) (((UData (1) << FSize (Field)) - 1) << FShft (Field))
#define FAlnMsk(Field) ((UData (1) << FSize (Field)) - 1)
#define F1stBit(Field) (UData (1) << FShft (Field))
/*
* MACRO: FInsrt
*
* Purpose
* The macro "FInsrt" inserts a value into a bit field by shifting the
* former appropriately.
*
* Input
* Value Bit-field value.
* Field Encoded bit field (using the macro "Fld").
*
* Output
* FInsrt Bit-field value positioned appropriately.
*/
#define FInsrt(Value, Field) \
(UData (Value) << FShft (Field))
/*
* MACRO: FExtr
*
* Purpose
* The macro "FExtr" extracts the value of a bit field by masking and
* shifting it appropriately.
*
* Input
* Data Data containing the bit-field to be extracted.
* Field Encoded bit field (using the macro "Fld").
*
* Output
* FExtr Bit-field value.
*/
#define FExtr(Data, Field) \
((UData (Data) >> FShft (Field)) & FAlnMsk (Field))
#endif /* __BITFIELD_H */
@@ -0,0 +1,23 @@
/*
* arch/arm/mach-sa1100/include/mach/cerf.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Apr-2003 : Removed some old PDA crud [FB]
*/
#ifndef _INCLUDE_CERF_H_
#define _INCLUDE_CERF_H_
#define CERF_ETH_IO 0xf0000000
#define CERF_ETH_IRQ IRQ_GPIO26
#define CERF_GPIO_CF_BVD2 19
#define CERF_GPIO_CF_BVD1 20
#define CERF_GPIO_CF_RESET 21
#define CERF_GPIO_CF_IRQ 22
#define CERF_GPIO_CF_CD 23
#endif // _INCLUDE_CERF_H_
@@ -0,0 +1,93 @@
/*
* arch/arm/mach-sa1100/include/mach/collie.h
*
* This file contains the hardware specific definitions for Collie
* Only include this file from SA1100-specific files.
*
* ChangeLog:
* 04-06-2001 Lineo Japan, Inc.
* 04-16-2001 SHARP Corporation
* 07-07-2002 Chris Larson <clarson@digi.com>
*
*/
#ifndef __ASM_ARCH_COLLIE_H
#define __ASM_ARCH_COLLIE_H
extern void locomolcd_power(int on);
#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0)
#define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12
#define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13
#define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14
#define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15
#define COLLIE_SCP_5VON SCOOP_GPCR_PA16
#define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17
#define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7)
#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
#define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \
COLLIE_SCP_LB_VOL_CHG)
#define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
/* GPIOs for gpiolib */
#define COLLIE_GPIO_ON_KEY (0)
#define COLLIE_GPIO_AC_IN (1)
#define COLLIE_GPIO_SDIO_INT (11)
#define COLLIE_GPIO_CF_IRQ (14)
#define COLLIE_GPIO_nREMOCON_INT (15)
#define COLLIE_GPIO_UCB1x00_RESET (16)
#define COLLIE_GPIO_nMIC_ON (17)
#define COLLIE_GPIO_nREMOCON_ON (18)
#define COLLIE_GPIO_CO (20)
#define COLLIE_GPIO_MCP_CLK (21)
#define COLLIE_GPIO_CF_CD (22)
#define COLLIE_GPIO_UCB1x00_IRQ (23)
#define COLLIE_GPIO_WAKEUP (24)
#define COLLIE_GPIO_GA_INT (25)
#define COLLIE_GPIO_MAIN_BAT_LOW (26)
/* GPIO definitions for direct register access */
#define _COLLIE_GPIO_ON_KEY GPIO_GPIO(0)
#define _COLLIE_GPIO_AC_IN GPIO_GPIO(1)
#define _COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15)
#define _COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16)
#define _COLLIE_GPIO_nMIC_ON GPIO_GPIO(17)
#define _COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18)
#define _COLLIE_GPIO_CO GPIO_GPIO(20)
#define _COLLIE_GPIO_WAKEUP GPIO_GPIO(24)
/* Interrupts */
#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0
#define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1
#define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11
#define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14
#define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15
#define COLLIE_IRQ_GPIO_CO IRQ_GPIO20
#define COLLIE_IRQ_GPIO_CF_CD IRQ_GPIO22
#define COLLIE_IRQ_GPIO_UCB1x00_IRQ IRQ_GPIO23
#define COLLIE_IRQ_GPIO_WAKEUP IRQ_GPIO24
#define COLLIE_IRQ_GPIO_GA_INT IRQ_GPIO25
#define COLLIE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO26
/* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
#define COLLIE_TC35143_GPIO_BASE (GPIO_MAX + 13)
#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0
#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1
#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2
#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3
#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4
#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5
#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5
#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6
#define COLLIE_GPIO_MBAT_ON (COLLIE_TC35143_GPIO_BASE + 7)
#define COLLIE_GPIO_BBAT_ON (COLLIE_TC35143_GPIO_BASE + 8)
#define COLLIE_GPIO_TMP_ON (COLLIE_TC35143_GPIO_BASE + 9)
#define COLLIE_TC35143_GPIO_IN (UCB_IO_0 | UCB_IO_2 | UCB_IO_5)
#define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \
| UCB_IO_6)
#endif
@@ -0,0 +1,62 @@
/* arch/arm/mach-sa1100/include/mach/debug-macro.S
*
* Debugging macro include header
*
* Copyright (C) 1994-1999 Russell King
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <mach/hardware.h>
.macro addruart, rp, rv, tmp
mrc p15, 0, \rp, c1, c0
tst \rp, #1 @ MMU enabled?
moveq \rp, #0x80000000 @ physical base address
movne \rp, #0xf8000000 @ virtual address
@ We probe for the active serial port here, coherently with
@ the comment in arch/arm/mach-sa1100/include/mach/uncompress.h.
@ We assume r1 can be clobbered.
@ see if Ser3 is active
add \rp, \rp, #0x00050000
ldr \rv, [\rp, #UTCR3]
tst \rv, #UTCR3_TXE
@ if Ser3 is inactive, then try Ser1
addeq \rp, \rp, #(0x00010000 - 0x00050000)
ldreq \rv, [\rp, #UTCR3]
tsteq \rv, #UTCR3_TXE
@ if Ser1 is inactive, then try Ser2
addeq \rp, \rp, #(0x00030000 - 0x00010000)
ldreq \rv, [\rp, #UTCR3]
tsteq \rv, #UTCR3_TXE
@ clear top bits, and generate both phys and virt addresses
lsl \rp, \rp, #8
lsr \rp, \rp, #8
orr \rv, \rp, #0xf8000000 @ virtual
orr \rp, \rp, #0x80000000 @ physical
.endm
.macro senduart,rd,rx
str \rd, [\rx, #UTDR]
.endm
.macro waituart,rd,rx
1001: ldr \rd, [\rx, #UTSR1]
tst \rd, #UTSR1_TNF
beq 1001b
.endm
.macro busyuart,rd,rx
1001: ldr \rd, [\rx, #UTSR1]
tst \rd, #UTSR1_TBY
bne 1001b
.endm
@@ -0,0 +1,41 @@
/*
* arch/arm/mach-sa1100/include/mach/entry-macro.S
*
* Low-level IRQ helper macros for SA1100-based platforms
*
* 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.
*/
.macro get_irqnr_preamble, base, tmp
mov \base, #0xfa000000 @ ICIP = 0xfa050000
add \base, \base, #0x00050000
.endm
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
ldr \irqstat, [\base] @ get irqs
ldr \irqnr, [\base, #4] @ ICMR = 0xfa050004
ands \irqstat, \irqstat, \irqnr
mov \irqnr, #0
beq 1001f
tst \irqstat, #0xff
moveq \irqstat, \irqstat, lsr #8
addeq \irqnr, \irqnr, #8
tsteq \irqstat, #0xff
moveq \irqstat, \irqstat, lsr #8
addeq \irqnr, \irqnr, #8
tsteq \irqstat, #0xff
moveq \irqstat, \irqstat, lsr #8
addeq \irqnr, \irqnr, #8
tst \irqstat, #0x0f
moveq \irqstat, \irqstat, lsr #4
addeq \irqnr, \irqnr, #4
tst \irqstat, #0x03
moveq \irqstat, \irqstat, lsr #2
addeq \irqnr, \irqnr, #2
tst \irqstat, #0x01
addeqs \irqnr, \irqnr, #1
1001:
.endm
@@ -0,0 +1,54 @@
/*
* arch/arm/mach-sa1100/include/mach/gpio.h
*
* SA1100 GPIO wrappers for arch-neutral GPIO calls
*
* Written by Philipp Zabel <philipp.zabel@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __ASM_ARCH_SA1100_GPIO_H
#define __ASM_ARCH_SA1100_GPIO_H
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm-generic/gpio.h>
#define __ARM_GPIOLIB_COMPLEX
static inline int gpio_get_value(unsigned gpio)
{
if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
return GPLR & GPIO_GPIO(gpio);
else
return __gpio_get_value(gpio);
}
static inline void gpio_set_value(unsigned gpio, int value)
{
if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
if (value)
GPSR = GPIO_GPIO(gpio);
else
GPCR = GPIO_GPIO(gpio);
else
__gpio_set_value(gpio, value);
}
#define gpio_cansleep __gpio_cansleep
#endif
@@ -0,0 +1,94 @@
/*
* Definitions for Compaq iPAQ H3100 and H3600 handheld computers
*
* (c) 2000 Compaq Computer Corporation. (Author: Jamey Hicks)
* (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef _INCLUDE_H3XXX_H_
#define _INCLUDE_H3XXX_H_
/* Physical memory regions corresponding to chip selects */
#define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000)
#define H3600_BANK_2_PHYS SA1100_CS2_PHYS
#define H3600_BANK_4_PHYS SA1100_CS4_PHYS
/* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */
#define H3600_EGPIO_VIRT 0xf0000000
#define H3600_BANK_2_VIRT 0xf1000000
#define H3600_BANK_4_VIRT 0xf3800000
/*
* gpiolib numbers for all iPAQs
*/
#define H3XXX_GPIO_PWR_BUTTON 0
#define H3XXX_GPIO_PCMCIA_CD1 10
#define H3XXX_GPIO_PCMCIA_IRQ1 11
#define H3XXX_GPIO_PCMCIA_CD0 17
#define H3XXX_GPIO_ACTION_BUTTON 18
#define H3XXX_GPIO_SYS_CLK 19
#define H3XXX_GPIO_PCMCIA_IRQ0 21
#define H3XXX_GPIO_COM_DCD 23
#define H3XXX_GPIO_OPTION 24
#define H3XXX_GPIO_COM_CTS 25
#define H3XXX_GPIO_COM_RTS 26
/* machine-specific gpios */
#define H3100_GPIO_BT_ON 2
#define H3100_GPIO_QMUTE 4
#define H3100_GPIO_LCD_3V_ON 5
#define H3100_GPIO_AUD_ON 6
#define H3100_GPIO_AUD_PWR_ON 7
#define H3100_GPIO_IR_ON 8
#define H3100_GPIO_IR_FSEL 9
#define H3600_GPIO_CLK_SET0 12 /* audio sample rate clock generator */
#define H3600_GPIO_CLK_SET1 13
#define H3600_GPIO_SOFT_RESET 20 /* also known as BATT_FAULT */
#define H3600_GPIO_OPT_LOCK 22
#define H3600_GPIO_OPT_DET 27
/* H3100 / 3600 EGPIO pins */
#define H3XXX_EGPIO_BASE (GPIO_MAX + 1)
#define H3XXX_EGPIO_VPP_ON (H3XXX_EGPIO_BASE + 0)
#define H3XXX_EGPIO_CARD_RESET (H3XXX_EGPIO_BASE + 1) /* reset the attached pcmcia/compactflash card. active high. */
#define H3XXX_EGPIO_OPT_RESET (H3XXX_EGPIO_BASE + 2) /* reset the attached option pack. active high. */
#define H3XXX_EGPIO_CODEC_NRESET (H3XXX_EGPIO_BASE + 3) /* reset the onboard UDA1341. active low. */
#define H3XXX_EGPIO_OPT_NVRAM_ON (H3XXX_EGPIO_BASE + 4) /* apply power to optionpack nvram, active high. */
#define H3XXX_EGPIO_OPT_ON (H3XXX_EGPIO_BASE + 5) /* full power to option pack. active high. */
#define H3XXX_EGPIO_LCD_ON (H3XXX_EGPIO_BASE + 6) /* enable 3.3V to LCD. active high. */
#define H3XXX_EGPIO_RS232_ON (H3XXX_EGPIO_BASE + 7) /* UART3 transceiver force on. Active high. */
/* H3600 only EGPIO pins */
#define H3600_EGPIO_LCD_PCI (H3XXX_EGPIO_BASE + 8) /* LCD control IC enable. active high. */
#define H3600_EGPIO_IR_ON (H3XXX_EGPIO_BASE + 9) /* apply power to IR module. active high. */
#define H3600_EGPIO_AUD_AMP_ON (H3XXX_EGPIO_BASE + 10) /* apply power to audio power amp. active high. */
#define H3600_EGPIO_AUD_PWR_ON (H3XXX_EGPIO_BASE + 11) /* apply power to reset of audio circuit. active high. */
#define H3600_EGPIO_QMUTE (H3XXX_EGPIO_BASE + 12) /* mute control for onboard UDA1341. active high. */
#define H3600_EGPIO_IR_FSEL (H3XXX_EGPIO_BASE + 13) /* IR speed select: 1->fast, 0->slow */
#define H3600_EGPIO_LCD_5V_ON (H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */
#define H3600_EGPIO_LVDD_ON (H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */
struct gpio_default_state {
int gpio;
int mode;
const char *name;
};
#define GPIO_MODE_IN -1
#define GPIO_MODE_OUT0 0
#define GPIO_MODE_OUT1 1
void h3xxx_init_gpio(struct gpio_default_state *s, size_t n);
void __init h3xxx_map_io(void);
void __init h3xxx_mach_init(void);
#endif /* _INCLUDE_H3XXX_H_ */
@@ -0,0 +1,79 @@
/*
* arch/arm/mach-sa1100/include/mach/hardware.h
*
* Copyright (C) 1998 Nicolas Pitre <nico@fluxnic.net>
*
* This file contains the hardware definitions for SA1100 architecture
*
* 2000/05/23 John Dorsey <john+@cs.cmu.edu>
* Definitions for SA1111 added.
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
#define UNCACHEABLE_ADDR 0xfa050000
/*
* SA1100 internal I/O mappings
*
* We have the following mapping:
* phys virt
* 80000000 f8000000
* 90000000 fa000000
* a0000000 fc000000
* b0000000 fe000000
*/
#define VIO_BASE 0xf8000000 /* virtual start of IO space */
#define VIO_SHIFT 3 /* x = IO space shrink power */
#define PIO_START 0x80000000 /* physical start of IO space */
#define io_p2v( x ) \
( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
#define io_v2p( x ) \
( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
#define CPU_SA1110_A0 (0)
#define CPU_SA1110_B0 (4)
#define CPU_SA1110_B1 (5)
#define CPU_SA1110_B2 (6)
#define CPU_SA1110_B4 (8)
#define CPU_SA1100_ID (0x4401a110)
#define CPU_SA1100_MASK (0xfffffff0)
#define CPU_SA1110_ID (0x6901b110)
#define CPU_SA1110_MASK (0xfffffff0)
#ifndef __ASSEMBLY__
#include <asm/cputype.h>
#define CPU_REVISION (read_cpuid_id() & 15)
#define cpu_is_sa1100() ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)
#define cpu_is_sa1110() ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)
# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
# define __PREG(x) (io_v2p((unsigned long)&(x)))
static inline unsigned long get_clock_tick_rate(void)
{
return 3686400;
}
#else
# define __REG(x) io_p2v(x)
# define __PREG(x) io_v2p(x)
#endif
#include "SA-1100.h"
#ifdef CONFIG_SA1101
#include "SA-1101.h"
#endif
#endif /* _ASM_ARCH_HARDWARE_H */
@@ -0,0 +1,89 @@
/*
* arch/arm/mach-sa1100/include/mach/irqs.h
*
* Copyright (C) 1996 Russell King
* Copyright (C) 1998 Deborah Wallach (updates for SA1100/Brutus).
* Copyright (C) 1999 Nicolas Pitre (full GPIO irq isolation)
*
* 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs.
*/
#define IRQ_GPIO0 0
#define IRQ_GPIO1 1
#define IRQ_GPIO2 2
#define IRQ_GPIO3 3
#define IRQ_GPIO4 4
#define IRQ_GPIO5 5
#define IRQ_GPIO6 6
#define IRQ_GPIO7 7
#define IRQ_GPIO8 8
#define IRQ_GPIO9 9
#define IRQ_GPIO10 10
#define IRQ_GPIO11_27 11
#define IRQ_LCD 12 /* LCD controller */
#define IRQ_Ser0UDC 13 /* Ser. port 0 UDC */
#define IRQ_Ser1SDLC 14 /* Ser. port 1 SDLC */
#define IRQ_Ser1UART 15 /* Ser. port 1 UART */
#define IRQ_Ser2ICP 16 /* Ser. port 2 ICP */
#define IRQ_Ser3UART 17 /* Ser. port 3 UART */
#define IRQ_Ser4MCP 18 /* Ser. port 4 MCP */
#define IRQ_Ser4SSP 19 /* Ser. port 4 SSP */
#define IRQ_DMA0 20 /* DMA controller channel 0 */
#define IRQ_DMA1 21 /* DMA controller channel 1 */
#define IRQ_DMA2 22 /* DMA controller channel 2 */
#define IRQ_DMA3 23 /* DMA controller channel 3 */
#define IRQ_DMA4 24 /* DMA controller channel 4 */
#define IRQ_DMA5 25 /* DMA controller channel 5 */
#define IRQ_OST0 26 /* OS Timer match 0 */
#define IRQ_OST1 27 /* OS Timer match 1 */
#define IRQ_OST2 28 /* OS Timer match 2 */
#define IRQ_OST3 29 /* OS Timer match 3 */
#define IRQ_RTC1Hz 30 /* RTC 1 Hz clock */
#define IRQ_RTCAlrm 31 /* RTC Alarm */
#define IRQ_GPIO11 32
#define IRQ_GPIO12 33
#define IRQ_GPIO13 34
#define IRQ_GPIO14 35
#define IRQ_GPIO15 36
#define IRQ_GPIO16 37
#define IRQ_GPIO17 38
#define IRQ_GPIO18 39
#define IRQ_GPIO19 40
#define IRQ_GPIO20 41
#define IRQ_GPIO21 42
#define IRQ_GPIO22 43
#define IRQ_GPIO23 44
#define IRQ_GPIO24 45
#define IRQ_GPIO25 46
#define IRQ_GPIO26 47
#define IRQ_GPIO27 48
/*
* The next 16 interrupts are for board specific purposes. Since
* the kernel can only run on one machine at a time, we can re-use
* these. If you need more, increase IRQ_BOARD_END, but keep it
* within sensible limits. IRQs 49 to 64 are available.
*/
#define IRQ_BOARD_START 49
#define IRQ_BOARD_END 65
/*
* Figure out the MAX IRQ number.
*
* Neponset, SA1111 and UCB1x00 are sparse IRQ aware, so can dynamically
* allocate their IRQs above NR_IRQS.
*
* LoCoMo has 4 additional IRQs, but is not sparse IRQ aware, and so has
* to be included in the NR_IRQS calculation.
*/
#ifdef CONFIG_SHARP_LOCOMO
#define NR_IRQS_LOCOMO 4
#else
#define NR_IRQS_LOCOMO 0
#endif
#ifndef NR_IRQS
#define NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO)
#endif
#define SA1100_NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO)
@@ -0,0 +1,32 @@
/*
* arch/arm/mach-sa1100/include/mach/jornada720.h
*
* SSP/MCU communication definitions for HP Jornada 710/720/728
*
* Copyright 2007,2008 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
* Copyright 2000 John Ankcorn <jca@lcs.mit.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
/* HP Jornada 7xx microprocessor commands */
#define GETBATTERYDATA 0xc0
#define GETSCANKEYCODE 0x90
#define GETTOUCHSAMPLES 0xa0
#define GETCONTRAST 0xD0
#define SETCONTRAST 0xD1
#define GETBRIGHTNESS 0xD2
#define SETBRIGHTNESS 0xD3
#define CONTRASTOFF 0xD8
#define BRIGHTNESSOFF 0xD9
#define PWMOFF 0xDF
#define TXDUMMY 0x11
#define ERRORCODE 0x00
extern void jornada_ssp_start(void);
extern void jornada_ssp_end(void);
extern int jornada_ssp_inout(u8 byte);
extern int jornada_ssp_byte(u8 byte);
@@ -0,0 +1,13 @@
#ifndef _INCLUDE_LART_H
#define _INCLUDE_LART_H
#define LART_GPIO_ETH0 GPIO_GPIO0
#define LART_IRQ_ETH0 IRQ_GPIO0
#define LART_GPIO_IDE GPIO_GPIO1
#define LART_IRQ_IDE IRQ_GPIO1
#define LART_GPIO_UCB1200 GPIO_GPIO18
#define LART_IRQ_UCB1200 IRQ_GPIO18
#endif
@@ -0,0 +1,22 @@
/*
* arch/arm/mach-sa1100/include/mach/mcp.h
*
* Copyright (C) 2005 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARM_ARCH_MCP_H
#define __ASM_ARM_ARCH_MCP_H
#include <linux/types.h>
struct mcp_plat_data {
u32 mccr0;
u32 mccr1;
unsigned int sclk_rate;
void *codec_pdata;
};
#endif
@@ -0,0 +1,41 @@
/*
* arch/arm/mach-sa1100/include/mach/memory.h
*
* Copyright (C) 1999-2000 Nicolas Pitre <nico@fluxnic.net>
*/
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
#include <asm/sizes.h>
/*
* Physical DRAM offset is 0xc0000000 on the SA1100
*/
#define PLAT_PHYS_OFFSET UL(0xc0000000)
/*
* Because of the wide memory address space between physical RAM banks on the
* SA1100, it's much convenient to use Linux's SparseMEM support to implement
* our memory map representation. Assuming all memory nodes have equal access
* characteristics, we then have generic discontiguous memory support.
*
* The sparsemem banks are matched with the physical memory bank addresses
* which are incidentally the same as virtual addresses.
*
* node 0: 0xc0000000 - 0xc7ffffff
* node 1: 0xc8000000 - 0xcfffffff
* node 2: 0xd0000000 - 0xd7ffffff
* node 3: 0xd8000000 - 0xdfffffff
*/
#define MAX_PHYSMEM_BITS 32
#define SECTION_SIZE_BITS 27
/*
* Cache flushing area - SA1100 zero bank
*/
#define FLUSH_BASE_PHYS 0xe0000000
#define FLUSH_BASE 0xf5000000
#define FLUSH_BASE_MINICACHE 0xf5100000
#endif
@@ -0,0 +1,26 @@
/*
* MTD primitives for XIP support. Architecture specific functions
*
* Do not include this file directly. It's included from linux/mtd/xip.h
*
* Author: Nicolas Pitre
* Created: Nov 2, 2004
* Copyright: (C) 2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ARCH_SA1100_MTD_XIP_H__
#define __ARCH_SA1100_MTD_XIP_H__
#include <mach/hardware.h>
#define xip_irqpending() (ICIP & ICMR)
/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
#define xip_currtime() (OSCR)
#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
#endif /* __ARCH_SA1100_MTD_XIP_H__ */
@@ -0,0 +1,52 @@
/*
* arch/arm/mach-sa1100/include/mach/nanoengine.h
*
* This file contains the hardware specific definitions for nanoEngine.
* Only include this file from SA1100-specific files.
*
* Copyright (C) 2010 Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __ASM_ARCH_NANOENGINE_H
#define __ASM_ARCH_NANOENGINE_H
#include <mach/irqs.h>
#define GPIO_PC_READY0 11 /* ready for socket 0 (active high)*/
#define GPIO_PC_READY1 12 /* ready for socket 1 (active high) */
#define GPIO_PC_CD0 13 /* detect for socket 0 (active low) */
#define GPIO_PC_CD1 14 /* detect for socket 1 (active low) */
#define GPIO_PC_RESET0 15 /* reset socket 0 */
#define GPIO_PC_RESET1 16 /* reset socket 1 */
#define NANOENGINE_IRQ_GPIO_PCI IRQ_GPIO0
#define NANOENGINE_IRQ_GPIO_PC_READY0 IRQ_GPIO11
#define NANOENGINE_IRQ_GPIO_PC_READY1 IRQ_GPIO12
#define NANOENGINE_IRQ_GPIO_PC_CD0 IRQ_GPIO13
#define NANOENGINE_IRQ_GPIO_PC_CD1 IRQ_GPIO14
/*
* nanoEngine Memory Map:
*
* 0000.0000 - 003F.0000 - 4 MB Flash
* C000.0000 - C1FF.FFFF - 32 MB SDRAM
* 1860.0000 - 186F.FFFF - 1 MB Internal PCI Memory Read/Write
* 18A1.0000 - 18A1.FFFF - 64 KB Internal PCI Config Space
* 4000.0000 - 47FF.FFFF - 128 MB External Bus I/O - Multiplexed Mode
* 4800.0000 - 4FFF.FFFF - 128 MB External Bus I/O - Non-Multiplexed Mode
*
*/
#define NANO_PCI_MEM_RW_PHYS 0x18600000
#define NANO_PCI_MEM_RW_VIRT 0xf1000000
#define NANO_PCI_MEM_RW_SIZE SZ_1M
#define NANO_PCI_CONFIG_SPACE_PHYS 0x18A10000
#define NANO_PCI_CONFIG_SPACE_VIRT 0xf2000000
#define NANO_PCI_CONFIG_SPACE_SIZE SZ_64K
#endif
@@ -0,0 +1,30 @@
/*
* arch/arm/mach-sa1100/include/mach/neponset.h
*
* Created 2000/06/05 by Nicolas Pitre <nico@fluxnic.net>
*
* This file contains the hardware specific definitions for Assabet
* Only include this file from SA1100-specific files.
*
* 2000/05/23 John Dorsey <john+@cs.cmu.edu>
* Definitions for Neponset added.
*/
#ifndef __ASM_ARCH_NEPONSET_H
#define __ASM_ARCH_NEPONSET_H
/*
* Neponset definitions:
*/
#define NCR_GP01_OFF (1<<0)
#define NCR_TP_PWR_EN (1<<1)
#define NCR_MS_PWR_EN (1<<2)
#define NCR_ENET_OSC_EN (1<<3)
#define NCR_SPI_KB_WK_UP (1<<4)
#define NCR_A0VPP (1<<5)
#define NCR_A1VPP (1<<6)
void neponset_ncr_frob(unsigned int, unsigned int);
#define neponset_ncr_set(v) neponset_ncr_frob(0, v)
#define neponset_ncr_clear(v) neponset_ncr_frob(v, 0)
#endif
@@ -0,0 +1,18 @@
#ifndef __ASM_ARCH_RESET_H
#define __ASM_ARCH_RESET_H
#include "hardware.h"
#define RESET_STATUS_HARDWARE (1 << 0) /* Hardware Reset */
#define RESET_STATUS_WATCHDOG (1 << 1) /* Watchdog Reset */
#define RESET_STATUS_LOWPOWER (1 << 2) /* Exit from Low Power/Sleep */
#define RESET_STATUS_GPIO (1 << 3) /* GPIO Reset */
#define RESET_STATUS_ALL (0xf)
extern unsigned int reset_status;
static inline void clear_reset_status(unsigned int mask)
{
RCSR = mask;
}
#endif /* __ASM_ARCH_RESET_H */
@@ -0,0 +1,39 @@
#ifndef _INCLUDE_SHANNON_H
#define _INCLUDE_SHANNON_H
/* taken from comp.os.inferno Tue, 12 Sep 2000 09:21:50 GMT,
* written by <forsyth@vitanuova.com> */
#define SHANNON_GPIO_SPI_FLASH GPIO_GPIO (0) /* Output - Driven low, enables SPI to flash */
#define SHANNON_GPIO_SPI_DSP GPIO_GPIO (1) /* Output - Driven low, enables SPI to DSP */
/* lcd lower = GPIO 2-9 */
#define SHANNON_GPIO_SPI_OUTPUT GPIO_GPIO (10) /* Output - SPI output to DSP */
#define SHANNON_GPIO_SPI_INPUT GPIO_GPIO (11) /* Input - SPI input from DSP */
#define SHANNON_GPIO_SPI_CLOCK GPIO_GPIO (12) /* Output - Clock for SPI */
#define SHANNON_GPIO_SPI_FRAME GPIO_GPIO (13) /* Output - Frame marker - not used */
#define SHANNON_GPIO_SPI_RTS GPIO_GPIO (14) /* Input - SPI Ready to Send */
#define SHANNON_IRQ_GPIO_SPI_RTS IRQ_GPIO14
#define SHANNON_GPIO_SPI_CTS GPIO_GPIO (15) /* Output - SPI Clear to Send */
#define SHANNON_GPIO_IRQ_CODEC GPIO_GPIO (16) /* in, irq from ucb1200 */
#define SHANNON_IRQ_GPIO_IRQ_CODEC IRQ_GPIO16
#define SHANNON_GPIO_DSP_RESET GPIO_GPIO (17) /* Output - Drive low to reset the DSP */
#define SHANNON_GPIO_CODEC_RESET GPIO_GPIO (18) /* Output - Drive low to reset the UCB1x00 */
#define SHANNON_GPIO_U3_RTS GPIO_GPIO (19) /* ?? */
#define SHANNON_GPIO_U3_CTS GPIO_GPIO (20) /* ?? */
#define SHANNON_GPIO_SENSE_12V GPIO_GPIO (21) /* Input, 12v flash unprotect detected */
#define SHANNON_GPIO_DISP_EN 22 /* out */
/* XXX GPIO 23 unaccounted for */
#define SHANNON_GPIO_EJECT_0 24 /* in */
#define SHANNON_GPIO_EJECT_1 25 /* in */
#define SHANNON_GPIO_RDY_0 26 /* in */
#define SHANNON_GPIO_RDY_1 27 /* in */
/* MCP UCB codec GPIO pins... */
#define SHANNON_UCB_GPIO_BACKLIGHT 9
#define SHANNON_UCB_GPIO_BRIGHT_MASK 7
#define SHANNON_UCB_GPIO_BRIGHT 6
#define SHANNON_UCB_GPIO_CONTRAST_MASK 0x3f
#define SHANNON_UCB_GPIO_CONTRAST 0
#endif
@@ -0,0 +1,158 @@
/*
* arch/arm/mach-sa1100/include/mach/simpad.h
*
* based of assabet.h same as HUW_Webpanel
*
* This file contains the hardware specific definitions for SIMpad
*
* 2001/05/14 Juergen Messerer <juergen.messerer@freesurf.ch>
*/
#ifndef __ASM_ARCH_SIMPAD_H
#define __ASM_ARCH_SIMPAD_H
#define GPIO_UART1_RTS GPIO_GPIO14
#define GPIO_UART1_DTR GPIO_GPIO7
#define GPIO_UART1_CTS GPIO_GPIO8
#define GPIO_UART1_DCD GPIO_GPIO23
#define GPIO_UART1_DSR GPIO_GPIO6
#define GPIO_UART3_RTS GPIO_GPIO12
#define GPIO_UART3_DTR GPIO_GPIO16
#define GPIO_UART3_CTS GPIO_GPIO13
#define GPIO_UART3_DCD GPIO_GPIO18
#define GPIO_UART3_DSR GPIO_GPIO17
#define GPIO_POWER_BUTTON GPIO_GPIO0
#define GPIO_UCB1300_IRQ GPIO_GPIO22 /* UCB GPIO and touchscreen */
#define IRQ_UART1_CTS IRQ_GPIO15
#define IRQ_UART1_DCD GPIO_GPIO23
#define IRQ_UART1_DSR GPIO_GPIO6
#define IRQ_UART3_CTS GPIO_GPIO13
#define IRQ_UART3_DCD GPIO_GPIO18
#define IRQ_UART3_DSR GPIO_GPIO17
#define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22
#define IRQ_GPIO_POWER_BUTTON IRQ_GPIO0
/*--- PCMCIA ---*/
#define GPIO_CF_CD 24
#define GPIO_CF_IRQ 1
/*--- SmartCard ---*/
#define GPIO_SMART_CARD GPIO_GPIO10
#define IRQ_GPIO_SMARD_CARD IRQ_GPIO10
/*--- ucb1x00 GPIO ---*/
#define SIMPAD_UCB1X00_GPIO_BASE (GPIO_MAX + 1)
#define SIMPAD_UCB1X00_GPIO_PROG1 (SIMPAD_UCB1X00_GPIO_BASE)
#define SIMPAD_UCB1X00_GPIO_PROG2 (SIMPAD_UCB1X00_GPIO_BASE + 1)
#define SIMPAD_UCB1X00_GPIO_UP (SIMPAD_UCB1X00_GPIO_BASE + 2)
#define SIMPAD_UCB1X00_GPIO_DOWN (SIMPAD_UCB1X00_GPIO_BASE + 3)
#define SIMPAD_UCB1X00_GPIO_LEFT (SIMPAD_UCB1X00_GPIO_BASE + 4)
#define SIMPAD_UCB1X00_GPIO_RIGHT (SIMPAD_UCB1X00_GPIO_BASE + 5)
#define SIMPAD_UCB1X00_GPIO_6 (SIMPAD_UCB1X00_GPIO_BASE + 6)
#define SIMPAD_UCB1X00_GPIO_7 (SIMPAD_UCB1X00_GPIO_BASE + 7)
#define SIMPAD_UCB1X00_GPIO_HEADSET (SIMPAD_UCB1X00_GPIO_BASE + 8)
#define SIMPAD_UCB1X00_GPIO_SPEAKER (SIMPAD_UCB1X00_GPIO_BASE + 9)
/*--- CS3 Latch ---*/
#define SIMPAD_CS3_GPIO_BASE (GPIO_MAX + 11)
#define SIMPAD_CS3_VCC_5V_EN (SIMPAD_CS3_GPIO_BASE)
#define SIMPAD_CS3_VCC_3V_EN (SIMPAD_CS3_GPIO_BASE + 1)
#define SIMPAD_CS3_EN1 (SIMPAD_CS3_GPIO_BASE + 2)
#define SIMPAD_CS3_EN0 (SIMPAD_CS3_GPIO_BASE + 3)
#define SIMPAD_CS3_DISPLAY_ON (SIMPAD_CS3_GPIO_BASE + 4)
#define SIMPAD_CS3_PCMCIA_BUFF_DIS (SIMPAD_CS3_GPIO_BASE + 5)
#define SIMPAD_CS3_MQ_RESET (SIMPAD_CS3_GPIO_BASE + 6)
#define SIMPAD_CS3_PCMCIA_RESET (SIMPAD_CS3_GPIO_BASE + 7)
#define SIMPAD_CS3_DECT_POWER_ON (SIMPAD_CS3_GPIO_BASE + 8)
#define SIMPAD_CS3_IRDA_SD (SIMPAD_CS3_GPIO_BASE + 9)
#define SIMPAD_CS3_RS232_ON (SIMPAD_CS3_GPIO_BASE + 10)
#define SIMPAD_CS3_SD_MEDIAQ (SIMPAD_CS3_GPIO_BASE + 11)
#define SIMPAD_CS3_LED2_ON (SIMPAD_CS3_GPIO_BASE + 12)
#define SIMPAD_CS3_IRDA_MODE (SIMPAD_CS3_GPIO_BASE + 13)
#define SIMPAD_CS3_ENABLE_5V (SIMPAD_CS3_GPIO_BASE + 14)
#define SIMPAD_CS3_RESET_SIMCARD (SIMPAD_CS3_GPIO_BASE + 15)
#define SIMPAD_CS3_PCMCIA_BVD1 (SIMPAD_CS3_GPIO_BASE + 16)
#define SIMPAD_CS3_PCMCIA_BVD2 (SIMPAD_CS3_GPIO_BASE + 17)
#define SIMPAD_CS3_PCMCIA_VS1 (SIMPAD_CS3_GPIO_BASE + 18)
#define SIMPAD_CS3_PCMCIA_VS2 (SIMPAD_CS3_GPIO_BASE + 19)
#define SIMPAD_CS3_LOCK_IND (SIMPAD_CS3_GPIO_BASE + 20)
#define SIMPAD_CS3_CHARGING_STATE (SIMPAD_CS3_GPIO_BASE + 21)
#define SIMPAD_CS3_PCMCIA_SHORT (SIMPAD_CS3_GPIO_BASE + 22)
#define SIMPAD_CS3_GPIO_23 (SIMPAD_CS3_GPIO_BASE + 23)
#define CS3_BASE 0xf1000000
long simpad_get_cs3_ro(void);
long simpad_get_cs3_shadow(void);
void simpad_set_cs3_bit(int value);
void simpad_clear_cs3_bit(int value);
#define VCC_5V_EN 0x0001 /* For 5V PCMCIA */
#define VCC_3V_EN 0x0002 /* FOR 3.3V PCMCIA */
#define EN1 0x0004 /* This is only for EPROM's */
#define EN0 0x0008 /* Both should be enable for 3.3V or 5V */
#define DISPLAY_ON 0x0010
#define PCMCIA_BUFF_DIS 0x0020
#define MQ_RESET 0x0040
#define PCMCIA_RESET 0x0080
#define DECT_POWER_ON 0x0100
#define IRDA_SD 0x0200 /* Shutdown for powersave */
#define RS232_ON 0x0400
#define SD_MEDIAQ 0x0800 /* Shutdown for powersave */
#define LED2_ON 0x1000
#define IRDA_MODE 0x2000 /* Fast/Slow IrDA mode */
#define ENABLE_5V 0x4000 /* Enable 5V circuit */
#define RESET_SIMCARD 0x8000
#define PCMCIA_BVD1 0x01
#define PCMCIA_BVD2 0x02
#define PCMCIA_VS1 0x04
#define PCMCIA_VS2 0x08
#define LOCK_IND 0x10
#define CHARGING_STATE 0x20
#define PCMCIA_SHORT 0x40
/*--- Battery ---*/
struct simpad_battery {
unsigned char ac_status; /* line connected yes/no */
unsigned char status; /* battery loading yes/no */
unsigned char percentage; /* percentage loaded */
unsigned short life; /* life till empty */
};
/* These should match the apm_bios.h definitions */
#define SIMPAD_AC_STATUS_AC_OFFLINE 0x00
#define SIMPAD_AC_STATUS_AC_ONLINE 0x01
#define SIMPAD_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
#define SIMPAD_AC_STATUS_AC_UNKNOWN 0xff
/* These bitfields are rarely "or'd" together */
#define SIMPAD_BATT_STATUS_HIGH 0x01
#define SIMPAD_BATT_STATUS_LOW 0x02
#define SIMPAD_BATT_STATUS_CRITICAL 0x04
#define SIMPAD_BATT_STATUS_CHARGING 0x08
#define SIMPAD_BATT_STATUS_CHARGE_MAIN 0x10
#define SIMPAD_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
#define SIMPAD_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
#define SIMPAD_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
#define SIMPAD_BATT_STATUS_NOBATT 0x80
#define SIMPAD_BATT_STATUS_UNKNOWN 0xff
extern int simpad_get_battery(struct simpad_battery* );
#endif // __ASM_ARCH_SIMPAD_H
@@ -0,0 +1,12 @@
/*
* arch/arm/mach-sa1100/include/mach/timex.h
*
* SA1100 architecture timex specifications
*
* Copyright (C) 1998
*/
/*
* SA1100 timer
*/
#define CLOCK_TICK_RATE 3686400
@@ -0,0 +1,50 @@
/*
* arch/arm/mach-sa1100/include/mach/uncompress.h
*
* (C) 1999 Nicolas Pitre <nico@fluxnic.net>
*
* Reorganised to be machine independent.
*/
#include "hardware.h"
/*
* The following code assumes the serial port has already been
* initialized by the bootloader. We search for the first enabled
* port in the most probable order. If you didn't setup a port in
* your bootloader then nothing will appear (which might be desired).
*/
#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
static void putc(int c)
{
unsigned long serial_port;
do {
serial_port = _Ser3UTCR0;
if (UART(UTCR3) & UTCR3_TXE) break;
serial_port = _Ser1UTCR0;
if (UART(UTCR3) & UTCR3_TXE) break;
serial_port = _Ser2UTCR0;
if (UART(UTCR3) & UTCR3_TXE) break;
return;
} while (0);
/* wait for space in the UART's transmitter */
while (!(UART(UTSR1) & UTSR1_TNF))
barrier();
/* send the character out. */
UART(UTDR) = c;
}
static inline void flush(void)
{
}
/*
* Nothing to do for these
*/
#define arch_decomp_setup()
#define arch_decomp_wdog()