parent
a475b5e2a0
commit
2dab301caa
@ -0,0 +1,33 @@ |
||||
#
|
||||
# (C) Copyright 2000
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# esd ADCIOP boards
|
||||
#
|
||||
|
||||
# FLASH:
|
||||
#TEXT_BASE = 0xFFFE0000
|
||||
TEXT_BASE = 0xFFFD0000
|
||||
|
||||
# SDRAM:
|
||||
#TEXT_BASE = 0x00FE0000
|
@ -0,0 +1,130 @@ |
||||
/* |
||||
* (C) Copyright 2000 |
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
||||
* |
||||
* See file CREDITS for list of people who contributed to this |
||||
* project. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
OUTPUT_ARCH(powerpc) |
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib); |
||||
/* Do we need any of these for elf? |
||||
__DYNAMIC = 0; */ |
||||
SECTIONS |
||||
{ |
||||
.resetvec 0xFFFFFFFC : |
||||
{ |
||||
*(.resetvec) |
||||
} = 0xffff |
||||
|
||||
/* Read-only sections, merged into text segment: */ |
||||
. = + SIZEOF_HEADERS; |
||||
.interp : { *(.interp) } |
||||
.hash : { *(.hash) } |
||||
.dynsym : { *(.dynsym) } |
||||
.dynstr : { *(.dynstr) } |
||||
.rel.text : { *(.rel.text) } |
||||
.rela.text : { *(.rela.text) } |
||||
.rel.data : { *(.rel.data) } |
||||
.rela.data : { *(.rela.data) } |
||||
.rel.rodata : { *(.rel.rodata) } |
||||
.rela.rodata : { *(.rela.rodata) } |
||||
.rel.got : { *(.rel.got) } |
||||
.rela.got : { *(.rela.got) } |
||||
.rel.ctors : { *(.rel.ctors) } |
||||
.rela.ctors : { *(.rela.ctors) } |
||||
.rel.dtors : { *(.rel.dtors) } |
||||
.rela.dtors : { *(.rela.dtors) } |
||||
.rel.bss : { *(.rel.bss) } |
||||
.rela.bss : { *(.rela.bss) } |
||||
.rel.plt : { *(.rel.plt) } |
||||
.rela.plt : { *(.rela.plt) } |
||||
.init : { *(.init) } |
||||
.plt : { *(.plt) } |
||||
.text : |
||||
{ |
||||
/* WARNING - the following is hand-optimized to fit within */ |
||||
/* the sector layout of our flash chips! XXX FIXME XXX */ |
||||
|
||||
cpu/ppc4xx/start.o (.text) |
||||
cpu/ppc4xx/traps.o (.text) |
||||
|
||||
*(.text) |
||||
*(.fixup) |
||||
*(.got1) |
||||
} |
||||
_etext = .; |
||||
PROVIDE (etext = .); |
||||
.rodata : |
||||
{ |
||||
*(.rodata) |
||||
*(.rodata1) |
||||
} |
||||
.fini : { *(.fini) } =0 |
||||
.ctors : { *(.ctors) } |
||||
.dtors : { *(.dtors) } |
||||
|
||||
/* Read-write section, merged into data segment: */ |
||||
. = (. + 0x0FFF) & 0xFFFFF000; |
||||
_erotext = .; |
||||
PROVIDE (erotext = .); |
||||
.reloc : |
||||
{ |
||||
*(.got) |
||||
_GOT2_TABLE_ = .; |
||||
*(.got2) |
||||
_FIXUP_TABLE_ = .; |
||||
*(.fixup) |
||||
} |
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2; |
||||
|
||||
.data : |
||||
{ |
||||
*(.data) |
||||
*(.data1) |
||||
*(.sdata) |
||||
*(.sdata2) |
||||
*(.dynamic) |
||||
CONSTRUCTORS |
||||
} |
||||
_edata = .; |
||||
PROVIDE (edata = .); |
||||
|
||||
__start___ex_table = .; |
||||
__ex_table : { *(__ex_table) } |
||||
__stop___ex_table = .; |
||||
|
||||
. = ALIGN(4096); |
||||
__init_begin = .; |
||||
.text.init : { *(.text.init) } |
||||
.data.init : { *(.data.init) } |
||||
. = ALIGN(4096); |
||||
__init_end = .; |
||||
|
||||
__bss_start = .; |
||||
.bss : |
||||
{ |
||||
*(.sbss) *(.scommon) |
||||
*(.dynbss) |
||||
*(.bss) |
||||
*(COMMON) |
||||
} |
||||
_end = . ; |
||||
PROVIDE (end = .); |
||||
} |
@ -0,0 +1,33 @@ |
||||
#
|
||||
# (C) Copyright 2000
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# esd ADCIOP boards
|
||||
#
|
||||
|
||||
# FLASH:
|
||||
#TEXT_BASE = 0xFFFE0000
|
||||
TEXT_BASE = 0xFFFD0000
|
||||
|
||||
# SDRAM:
|
||||
#TEXT_BASE = 0x00FE0000
|
@ -0,0 +1,44 @@ |
||||
/*
|
||||
* (C) Copyright 2000 |
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
||||
* |
||||
* See file CREDITS for list of people who contributed to this |
||||
* project. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
/****************************************************************************
|
||||
* FLASH Memory Map as used by TQ Monitor: |
||||
* |
||||
* Start Address Length |
||||
* +-----------------------+ 0x4000_0000 Start of Flash ----------------- |
||||
* | MON8xx code | 0x4000_0100 Reset Vector |
||||
* +-----------------------+ 0x400?_???? |
||||
* | (unused) | |
||||
* +-----------------------+ 0x4001_FF00 |
||||
* | Ethernet Addresses | 0x78 |
||||
* +-----------------------+ 0x4001_FF78 |
||||
* | (Reserved for MON8xx) | 0x44 |
||||
* +-----------------------+ 0x4001_FFBC |
||||
* | Lock Address | 0x04 |
||||
* +-----------------------+ 0x4001_FFC0 ^ |
||||
* | Hardware Information | 0x40 | MON8xx |
||||
* +=======================+ 0x4002_0000 (sector border) ----------------- |
||||
* | Autostart Header | | Applications |
||||
* | ... | v |
||||
* |
||||
*****************************************************************************/ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
||||
#
|
||||
# (C) Copyright 2000
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk |
||||
|
||||
LIB = lib$(BOARD).a
|
||||
|
||||
OBJS = $(BOARD).o flash.o bsp.o eeprom.o fetch.o
|
||||
|
||||
$(LIB): .depend $(OBJS) |
||||
$(AR) crv $@ $^
|
||||
|
||||
#########################################################################
|
||||
|
||||
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) |
||||
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
|
||||
|
||||
sinclude .depend |
||||
|
||||
#########################################################################
|
@ -0,0 +1,163 @@ |
||||
/*************** DEFINES for Intel StrataFlash FLASH chip ********************/ |
||||
|
||||
/*
|
||||
* acceptable chips types are: |
||||
* |
||||
* 28F320J5, 28F640J5, 28F320J3A, 28F640J3A and 28F128J3A |
||||
*/ |
||||
|
||||
/* register addresses, valid only following an CHIP_CMD_RD_ID command */ |
||||
#define CHIP_ADDR_REG_MAN 0x000000 /* manufacturer's id */ |
||||
#define CHIP_ADDR_REG_DEV 0x000001 /* device id */ |
||||
#define CHIP_ADDR_REG_CFGM 0x000003 /* master lock config */ |
||||
#define CHIP_ADDR_REG_CFG(b) (((b)<<16)|2) /* lock config for block b */ |
||||
|
||||
/* Commands */ |
||||
#define CHIP_CMD_RST 0xFF /* reset flash */ |
||||
#define CHIP_CMD_RD_ID 0x90 /* read the id and lock bits */ |
||||
#define CHIP_CMD_RD_QUERY 0x98 /* read device capabilities */ |
||||
#define CHIP_CMD_RD_STAT 0x70 /* read the status register */ |
||||
#define CHIP_CMD_CLR_STAT 0x50 /* clear the staus register */ |
||||
#define CHIP_CMD_WR_BUF 0xE8 /* clear the staus register */ |
||||
#define CHIP_CMD_PROG 0x40 /* program word command */ |
||||
#define CHIP_CMD_ERASE1 0x20 /* 1st word for block erase */ |
||||
#define CHIP_CMD_ERASE2 0xD0 /* 2nd word for block erase */ |
||||
#define CHIP_CMD_ERASE_SUSP 0xB0 /* suspend block erase */ |
||||
#define CHIP_CMD_LOCK 0x60 /* 1st word for all lock cmds */ |
||||
#define CHIP_CMD_SET_LOCK_BLK 0x01 /* 2nd wrd set block lock bit */ |
||||
#define CHIP_CMD_SET_LOCK_MSTR 0xF1 /* 2nd wrd set master lck bit */ |
||||
#define CHIP_CMD_CLR_LOCK_BLK 0xD0 /* 2nd wrd clear blk lck bit */ |
||||
|
||||
/* status register bits */ |
||||
#define CHIP_STAT_DPS 0x02 /* Device Protect Status */ |
||||
#define CHIP_STAT_VPPS 0x08 /* VPP Status */ |
||||
#define CHIP_STAT_PSLBS 0x10 /* Program+Set Lock Bit Stat */ |
||||
#define CHIP_STAT_ECLBS 0x20 /* Erase+Clr Lock Bit Stat */ |
||||
#define CHIP_STAT_ESS 0x40 /* Erase Suspend Status */ |
||||
#define CHIP_STAT_RDY 0x80 /* WSM Mach Status, 1=rdy */ |
||||
|
||||
#define CHIP_STAT_ERR (CHIP_STAT_VPPS | CHIP_STAT_DPS | \ |
||||
CHIP_STAT_ECLBS | CHIP_STAT_PSLBS) |
||||
|
||||
/* ID and Lock Configuration */ |
||||
#define CHIP_RD_ID_LOCK 0x01 /* Bit 0 of each byte */ |
||||
#define CHIP_RD_ID_MAN 0x89 /* Manufacturer code = 0x89 */ |
||||
#define CHIP_RD_ID_DEV CFG_FLASH_ID |
||||
|
||||
/* dimensions */ |
||||
#define CHIP_WIDTH 2 /* chips are in 16 bit mode */ |
||||
#define CHIP_WSHIFT 1 /* (log2 of CHIP_WIDTH) */ |
||||
#define CHIP_NBLOCKS CFG_FLASH_NBLOCKS |
||||
#define CHIP_BLKSZ (128 * 1024) /* of 128Kbytes each */ |
||||
#define CHIP_SIZE (CHIP_BLKSZ * CHIP_NBLOCKS) |
||||
|
||||
/********************** DEFINES for Hymod Flash ******************************/ |
||||
|
||||
/*
|
||||
* The hymod board has 2 x 28F320J5 chips running in |
||||
* 16 bit mode, for a 32 bit wide bank. |
||||
*/ |
||||
|
||||
typedef unsigned long bank_word_t; /* 8/16/32/64bit unsigned int */ |
||||
typedef volatile bank_word_t *bank_addr_t; |
||||
typedef unsigned long bank_size_t; /* want this big - >= 32 bit */ |
||||
|
||||
#define BANK_CHIP_WIDTH 2 /* each bank is 2 chips wide */ |
||||
#define BANK_CHIP_WSHIFT 1 /* (log2 of BANK_CHIP_WIDTH) */ |
||||
|
||||
#define BANK_WIDTH (CHIP_WIDTH * BANK_CHIP_WIDTH) |
||||
#define BANK_WSHIFT (CHIP_WSHIFT + BANK_CHIP_WSHIFT) |
||||
#define BANK_NBLOCKS CHIP_NBLOCKS |
||||
#define BANK_BLKSZ (CHIP_BLKSZ * BANK_CHIP_WIDTH) |
||||
#define BANK_SIZE (CHIP_SIZE * BANK_CHIP_WIDTH) |
||||
|
||||
#define MAX_BANKS 1 /* only one bank possible */ |
||||
|
||||
/* align bank addresses and sizes to bank word boundaries */ |
||||
#define BANK_ADDR_WORD_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \ |
||||
& ~(BANK_WIDTH - 1))) |
||||
#define BANK_SIZE_WORD_ALIGN(s) ((bank_size_t)BANK_ADDR_WORD_ALIGN( \ |
||||
(bank_size_t)(s) + (BANK_WIDTH - 1))) |
||||
|
||||
/* align bank addresses and sizes to bank block boundaries */ |
||||
#define BANK_ADDR_BLK_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \ |
||||
& ~(BANK_BLKSZ - 1))) |
||||
#define BANK_SIZE_BLK_ALIGN(s) ((bank_size_t)BANK_ADDR_BLK_ALIGN( \ |
||||
(bank_size_t)(s) + (BANK_BLKSZ - 1))) |
||||
|
||||
/* align bank addresses and sizes to bank boundaries */ |
||||
#define BANK_ADDR_BANK_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \ |
||||
& ~(BANK_SIZE - 1))) |
||||
#define BANK_SIZE_BANK_ALIGN(s) ((bank_size_t)BANK_ADDR_BANK_ALIGN( \ |
||||
(bank_size_t)(s) + (BANK_SIZE - 1))) |
||||
|
||||
/* add an offset to a bank address */ |
||||
#define BANK_ADDR_OFFSET(a, o) (bank_addr_t)((bank_size_t)(a) + \ |
||||
(bank_size_t)(o)) |
||||
|
||||
/* get base address of bank b, given flash base address a */ |
||||
#define BANK_ADDR_BASE(a, b) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \ |
||||
(bank_size_t)(b) * BANK_SIZE) |
||||
|
||||
/* adjust a bank address to start of next word, block or bank */ |
||||
#define BANK_ADDR_NEXT_WORD(a) BANK_ADDR_OFFSET(BANK_ADDR_WORD_ALIGN(a), \ |
||||
BANK_WIDTH) |
||||
#define BANK_ADDR_NEXT_BLK(a) BANK_ADDR_OFFSET(BANK_ADDR_BLK_ALIGN(a), \ |
||||
BANK_BLKSZ) |
||||
#define BANK_ADDR_NEXT_BANK(a) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \ |
||||
BANK_SIZE) |
||||
|
||||
/* get bank address of chip register r given a bank base address a */ |
||||
#define BANK_ADDR_REG(a, r) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \ |
||||
((bank_size_t)(r) << BANK_WSHIFT)) |
||||
|
||||
/* make a bank address for each chip register address */ |
||||
|
||||
#define BANK_ADDR_REG_MAN(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_MAN) |
||||
#define BANK_ADDR_REG_DEV(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_DEV) |
||||
#define BANK_ADDR_REG_CFGM(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_CFGM) |
||||
#define BANK_ADDR_REG_CFG(b,a) BANK_ADDR_REG((a), CHIP_ADDR_REG_CFG(b)) |
||||
|
||||
/*
|
||||
* replicate a chip cmd/stat/rd value into each byte position within a word |
||||
* so that multiple chips are accessed in a single word i/o operation |
||||
* |
||||
* this must be as wide as the bank_word_t type, and take into account the |
||||
* chip width and bank layout |
||||
*/ |
||||
|
||||
#define BANK_FILL_WORD(o) ((bank_word_t)( \ |
||||
((unsigned long)(o) << 16) | \
|
||||
((unsigned long)(o) << 0) \
|
||||
)) |
||||
|
||||
/* make a bank word value for each chip cmd/stat/rd value */ |
||||
|
||||
/* Commands */ |
||||
#define BANK_CMD_RST BANK_FILL_WORD(CHIP_CMD_RST) |
||||
#define BANK_CMD_RD_ID BANK_FILL_WORD(CHIP_CMD_RD_ID) |
||||
#define BANK_CMD_RD_STAT BANK_FILL_WORD(CHIP_CMD_RD_STAT) |
||||
#define BANK_CMD_CLR_STAT BANK_FILL_WORD(CHIP_CMD_CLR_STAT) |
||||
#define BANK_CMD_ERASE1 BANK_FILL_WORD(CHIP_CMD_ERASE1) |
||||
#define BANK_CMD_ERASE2 BANK_FILL_WORD(CHIP_CMD_ERASE2) |
||||
#define BANK_CMD_PROG BANK_FILL_WORD(CHIP_CMD_PROG) |
||||
#define BANK_CMD_LOCK BANK_FILL_WORD(CHIP_CMD_LOCK) |
||||
#define BANK_CMD_SET_LOCK_BLK BANK_FILL_WORD(CHIP_CMD_SET_LOCK_BLK) |
||||
#define BANK_CMD_SET_LOCK_MSTR BANK_FILL_WORD(CHIP_CMD_SET_LOCK_MSTR) |
||||
#define BANK_CMD_CLR_LOCK_BLK BANK_FILL_WORD(CHIP_CMD_CLR_LOCK_BLK) |
||||
|
||||
/* status register bits */ |
||||
#define BANK_STAT_DPS BANK_FILL_WORD(CHIP_STAT_DPS) |
||||
#define BANK_STAT_PSS BANK_FILL_WORD(CHIP_STAT_PSS) |
||||
#define BANK_STAT_VPPS BANK_FILL_WORD(CHIP_STAT_VPPS) |
||||
#define BANK_STAT_PSLBS BANK_FILL_WORD(CHIP_STAT_PSLBS) |
||||
#define BANK_STAT_ECLBS BANK_FILL_WORD(CHIP_STAT_ECLBS) |
||||
#define BANK_STAT_ESS BANK_FILL_WORD(CHIP_STAT_ESS) |
||||
#define BANK_STAT_RDY BANK_FILL_WORD(CHIP_STAT_RDY) |
||||
|
||||
#define BANK_STAT_ERR BANK_FILL_WORD(CHIP_STAT_ERR) |
||||
|
||||
/* ID and Lock Configuration */ |
||||
#define BANK_RD_ID_LOCK BANK_FILL_WORD(CHIP_RD_ID_LOCK) |
||||
#define BANK_RD_ID_MAN BANK_FILL_WORD(CHIP_RD_ID_MAN) |
||||
#define BANK_RD_ID_DEV BANK_FILL_WORD(CHIP_RD_ID_DEV) |
@ -0,0 +1,28 @@ |
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# Nexus boards
|
||||
#
|
||||
|
||||
TEXT_BASE = 0x40000000
|
@ -0,0 +1,28 @@ |
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# TQM8xxL boards
|
||||
#
|
||||
|
||||
TEXT_BASE = 0x40000000
|
@ -0,0 +1,40 @@ |
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk |
||||
|
||||
LIB = lib$(BOARD).a
|
||||
|
||||
OBJS = $(BOARD).o flash.o
|
||||
|
||||
$(LIB): .depend $(OBJS) |
||||
$(AR) crv $@ $^
|
||||
|
||||
#########################################################################
|
||||
|
||||
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) |
||||
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
|
||||
|
||||
sinclude .depend |
||||
|
||||
#########################################################################
|
@ -0,0 +1,28 @@ |
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# Siemens PCU E Boards
|
||||
#
|
||||
|
||||
TEXT_BASE = 0xFFF00000
|
@ -0,0 +1,122 @@ |
||||
/* |
||||
* (C) Copyright 2001 |
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
||||
* |
||||
* See file CREDITS for list of people who contributed to this |
||||
* project. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
OUTPUT_ARCH(powerpc) |
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib); |
||||
/* Do we need any of these for elf? |
||||
__DYNAMIC = 0; */ |
||||
SECTIONS |
||||
{ |
||||
/* Read-only sections, merged into text segment: */ |
||||
. = + SIZEOF_HEADERS; |
||||
.interp : { *(.interp) } |
||||
.hash : { *(.hash) } |
||||
.dynsym : { *(.dynsym) } |
||||
.dynstr : { *(.dynstr) } |
||||
.rel.text : { *(.rel.text) } |
||||
.rela.text : { *(.rela.text) } |
||||
.rel.data : { *(.rel.data) } |
||||
.rela.data : { *(.rela.data) } |
||||
.rel.rodata : { *(.rel.rodata) } |
||||
.rela.rodata : { *(.rela.rodata) } |
||||
.rel.got : { *(.rel.got) } |
||||
.rela.got : { *(.rela.got) } |
||||
.rel.ctors : { *(.rel.ctors) } |
||||
.rela.ctors : { *(.rela.ctors) } |
||||
.rel.dtors : { *(.rel.dtors) } |
||||
.rela.dtors : { *(.rela.dtors) } |
||||
.rel.bss : { *(.rel.bss) } |
||||
.rela.bss : { *(.rela.bss) } |
||||
.rel.plt : { *(.rel.plt) } |
||||
.rela.plt : { *(.rela.plt) } |
||||
.init : { *(.init) } |
||||
.plt : { *(.plt) } |
||||
.text : |
||||
{ |
||||
cpu/mpc8xx/start.o (.text) |
||||
common/environment.o(.text) |
||||
*(.text) |
||||
*(.fixup) |
||||
*(.got1) |
||||
} |
||||
_etext = .; |
||||
PROVIDE (etext = .); |
||||
.rodata : |
||||
{ |
||||
*(.rodata) |
||||
*(.rodata1) |
||||
} |
||||
.fini : { *(.fini) } =0 |
||||
.ctors : { *(.ctors) } |
||||
.dtors : { *(.dtors) } |
||||
|
||||
/* Read-write section, merged into data segment: */ |
||||
. = (. + 0x0FF) & 0xFFFFFF00; |
||||
_erotext = .; |
||||
PROVIDE (erotext = .); |
||||
.reloc : |
||||
{ |
||||
*(.got) |
||||
_GOT2_TABLE_ = .; |
||||
*(.got2) |
||||
_FIXUP_TABLE_ = .; |
||||
*(.fixup) |
||||
} |
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2; |
||||
|
||||
.data : |
||||
{ |
||||
*(.data) |
||||
*(.data1) |
||||
*(.sdata) |
||||
*(.sdata2) |
||||
*(.dynamic) |
||||
CONSTRUCTORS |
||||
} |
||||
_edata = .; |
||||
PROVIDE (edata = .); |
||||
|
||||
__start___ex_table = .; |
||||
__ex_table : { *(__ex_table) } |
||||
__stop___ex_table = .; |
||||
|
||||
. = ALIGN(256); |
||||
__init_begin = .; |
||||
.text.init : { *(.text.init) } |
||||
.data.init : { *(.data.init) } |
||||
. = ALIGN(256); |
||||
__init_end = .; |
||||
|
||||
__bss_start = .; |
||||
.bss : |
||||
{ |
||||
*(.sbss) *(.scommon) |
||||
*(.dynbss) |
||||
*(.bss) |
||||
*(COMMON) |
||||
} |
||||
_end = . ; |
||||
PROVIDE (end = .); |
||||
} |
||||
|
@ -0,0 +1,333 @@ |
||||
/*
|
||||
* bitops.h: Bit string operations on the ppc |
||||
*/ |
||||
|
||||
#ifndef _PPC_BITOPS_H |
||||
#define _PPC_BITOPS_H |
||||
|
||||
#include <linux/config.h> |
||||
#include <asm/byteorder.h> |
||||
|
||||
extern void set_bit(int nr, volatile void *addr); |
||||
extern void clear_bit(int nr, volatile void *addr); |
||||
extern void change_bit(int nr, volatile void *addr); |
||||
extern int test_and_set_bit(int nr, volatile void *addr); |
||||
extern int test_and_clear_bit(int nr, volatile void *addr); |
||||
extern int test_and_change_bit(int nr, volatile void *addr); |
||||
|
||||
/*
|
||||
* Arguably these bit operations don't imply any memory barrier or |
||||
* SMP ordering, but in fact a lot of drivers expect them to imply |
||||
* both, since they do on x86 cpus. |
||||
*/ |
||||
#ifdef CONFIG_SMP |
||||
#define SMP_WMB "eieio\n" |
||||
#define SMP_MB "\nsync" |
||||
#else |
||||
#define SMP_WMB |
||||
#define SMP_MB |
||||
#endif /* CONFIG_SMP */ |
||||
|
||||
#define __INLINE_BITOPS 1 |
||||
|
||||
#if __INLINE_BITOPS |
||||
/*
|
||||
* These used to be if'd out here because using : "cc" as a constraint |
||||
* resulted in errors from egcs. Things may be OK with gcc-2.95. |
||||
*/ |
||||
extern __inline__ void set_bit(int nr, volatile void * addr) |
||||
{ |
||||
unsigned long old; |
||||
unsigned long mask = 1 << (nr & 0x1f); |
||||
unsigned long *p = ((unsigned long *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%3\n\
|
||||
or %0,%0,%2\n\
|
||||
stwcx. %0,0,%3\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc" ); |
||||
} |
||||
|
||||
extern __inline__ void clear_bit(int nr, volatile void *addr) |
||||
{ |
||||
unsigned long old; |
||||
unsigned long mask = 1 << (nr & 0x1f); |
||||
unsigned long *p = ((unsigned long *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%3\n\
|
||||
andc %0,%0,%2\n\
|
||||
stwcx. %0,0,%3\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc"); |
||||
} |
||||
|
||||
extern __inline__ void change_bit(int nr, volatile void *addr) |
||||
{ |
||||
unsigned long old; |
||||
unsigned long mask = 1 << (nr & 0x1f); |
||||
unsigned long *p = ((unsigned long *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%3\n\
|
||||
xor %0,%0,%2\n\
|
||||
stwcx. %0,0,%3\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc"); |
||||
} |
||||
|
||||
extern __inline__ int test_and_set_bit(int nr, volatile void *addr) |
||||
{ |
||||
unsigned int old, t; |
||||
unsigned int mask = 1 << (nr & 0x1f); |
||||
volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%4\n\
|
||||
or %1,%0,%3\n\
|
||||
stwcx. %1,0,%4\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=&r" (t), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc"); |
||||
|
||||
return (old & mask) != 0; |
||||
} |
||||
|
||||
extern __inline__ int test_and_clear_bit(int nr, volatile void *addr) |
||||
{ |
||||
unsigned int old, t; |
||||
unsigned int mask = 1 << (nr & 0x1f); |
||||
volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%4\n\
|
||||
andc %1,%0,%3\n\
|
||||
stwcx. %1,0,%4\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=&r" (t), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc"); |
||||
|
||||
return (old & mask) != 0; |
||||
} |
||||
|
||||
extern __inline__ int test_and_change_bit(int nr, volatile void *addr) |
||||
{ |
||||
unsigned int old, t; |
||||
unsigned int mask = 1 << (nr & 0x1f); |
||||
volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5); |
||||
|
||||
__asm__ __volatile__(SMP_WMB "\
|
||||
1: lwarx %0,0,%4\n\
|
||||
xor %1,%0,%3\n\
|
||||
stwcx. %1,0,%4\n\
|
||||
bne 1b" |
||||
SMP_MB |
||||
: "=&r" (old), "=&r" (t), "=m" (*p) |
||||
: "r" (mask), "r" (p), "m" (*p) |
||||
: "cc"); |
||||
|
||||
return (old & mask) != 0; |
||||
} |
||||
#endif /* __INLINE_BITOPS */ |
||||
|
||||
extern __inline__ int test_bit(int nr, __const__ volatile void *addr) |
||||
{ |
||||
__const__ unsigned int *p = (__const__ unsigned int *) addr; |
||||
|
||||
return ((p[nr >> 5] >> (nr & 0x1f)) & 1) != 0; |
||||
} |
||||
|
||||
/* Return the bit position of the most significant 1 bit in a word */ |
||||
extern __inline__ int __ilog2(unsigned int x) |
||||
{ |
||||
int lz; |
||||
|
||||
asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x)); |
||||
return 31 - lz; |
||||
} |
||||
|
||||
extern __inline__ int ffz(unsigned int x) |
||||
{ |
||||
if ((x = ~x) == 0) |
||||
return 32; |
||||
return __ilog2(x & -x); |
||||
} |
||||
|
||||
#ifdef __KERNEL__ |
||||
|
||||
/*
|
||||
* ffs: find first bit set. This is defined the same way as |
||||
* the libc and compiler builtin ffs routines, therefore |
||||
* differs in spirit from the above ffz (man ffs). |
||||
*/ |
||||
extern __inline__ int ffs(int x) |
||||
{ |
||||
return __ilog2(x & -x) + 1; |
||||
} |
||||
|
||||
/*
|
||||
* hweightN: returns the hamming weight (i.e. the number |
||||
* of bits set) of a N-bit word |
||||
*/ |
||||
|
||||
#define hweight32(x) generic_hweight32(x) |
||||
#define hweight16(x) generic_hweight16(x) |
||||
#define hweight8(x) generic_hweight8(x) |
||||
|
||||
#endif /* __KERNEL__ */ |
||||
|
||||
/*
|
||||
* This implementation of find_{first,next}_zero_bit was stolen from |
||||
* Linus' asm-alpha/bitops.h. |
||||
*/ |
||||
#define find_first_zero_bit(addr, size) \ |
||||
find_next_zero_bit((addr), (size), 0) |
||||
|
||||
extern __inline__ unsigned long find_next_zero_bit(void * addr, |
||||
unsigned long size, unsigned long offset) |
||||
{ |
||||
unsigned int * p = ((unsigned int *) addr) + (offset >> 5); |
||||
unsigned int result = offset & ~31UL; |
||||
unsigned int tmp; |
||||
|
||||
if (offset >= size) |
||||
return size; |
||||
size -= result; |
||||
offset &= 31UL; |
||||
if (offset) { |
||||
tmp = *p++; |
||||
tmp |= ~0UL >> (32-offset); |
||||
if (size < 32) |
||||
goto found_first; |
||||
if (tmp != ~0U) |
||||
goto found_middle; |
||||
size -= 32; |
||||
result += 32; |
||||
} |
||||
while (size >= 32) { |
||||
if ((tmp = *p++) != ~0U) |
||||
goto found_middle; |
||||
result += 32; |
||||
size -= 32; |
||||
} |
||||
if (!size) |
||||
return result; |
||||
tmp = *p; |
||||
found_first: |
||||
tmp |= ~0UL << size; |
||||
found_middle: |
||||
return result + ffz(tmp); |
||||
} |
||||
|
||||
|
||||
#define _EXT2_HAVE_ASM_BITOPS_ |
||||
|
||||
#ifdef __KERNEL__ |
||||
/*
|
||||
* test_and_{set,clear}_bit guarantee atomicity without |
||||
* disabling interrupts. |
||||
*/ |
||||
#define ext2_set_bit(nr, addr) test_and_set_bit((nr) ^ 0x18, addr) |
||||
#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 0x18, addr) |
||||
|
||||
#else |
||||
extern __inline__ int ext2_set_bit(int nr, void * addr) |
||||
{ |
||||
int mask; |
||||
unsigned char *ADDR = (unsigned char *) addr; |
||||
int oldbit; |
||||
|
||||
ADDR += nr >> 3; |
||||
mask = 1 << (nr & 0x07); |
||||
oldbit = (*ADDR & mask) ? 1 : 0; |
||||
*ADDR |= mask; |
||||
return oldbit; |
||||
} |
||||
|
||||
extern __inline__ int ext2_clear_bit(int nr, void * addr) |
||||
{ |
||||
int mask; |
||||
unsigned char *ADDR = (unsigned char *) addr; |
||||
int oldbit; |
||||
|
||||
ADDR += nr >> 3; |
||||
mask = 1 << (nr & 0x07); |
||||
oldbit = (*ADDR & mask) ? 1 : 0; |
||||
*ADDR = *ADDR & ~mask; |
||||
return oldbit; |
||||
} |
||||
#endif /* __KERNEL__ */ |
||||
|
||||
extern __inline__ int ext2_test_bit(int nr, __const__ void * addr) |
||||
{ |
||||
__const__ unsigned char *ADDR = (__const__ unsigned char *) addr; |
||||
|
||||
return (ADDR[nr >> 3] >> (nr & 7)) & 1; |
||||
} |
||||
|
||||
/*
|
||||
* This implementation of ext2_find_{first,next}_zero_bit was stolen from |
||||
* Linus' asm-alpha/bitops.h and modified for a big-endian machine. |
||||
*/ |
||||
|
||||
#define ext2_find_first_zero_bit(addr, size) \ |
||||
ext2_find_next_zero_bit((addr), (size), 0) |
||||
|
||||
extern __inline__ unsigned long ext2_find_next_zero_bit(void *addr, |
||||
unsigned long size, unsigned long offset) |
||||
{ |
||||
unsigned int *p = ((unsigned int *) addr) + (offset >> 5); |
||||
unsigned int result = offset & ~31UL; |
||||
unsigned int tmp; |
||||
|
||||
if (offset >= size) |
||||
return size; |
||||
size -= result; |
||||
offset &= 31UL; |
||||
if (offset) { |
||||
tmp = cpu_to_le32p(p++); |
||||
tmp |= ~0UL >> (32-offset); |
||||
if (size < 32) |
||||
goto found_first; |
||||
if (tmp != ~0U) |
||||
goto found_middle; |
||||
size -= 32; |
||||
result += 32; |
||||
} |
||||
while (size >= 32) { |
||||
if ((tmp = cpu_to_le32p(p++)) != ~0U) |
||||
goto found_middle; |
||||
result += 32; |
||||
size -= 32; |
||||
} |
||||
if (!size) |
||||
return result; |
||||
tmp = cpu_to_le32p(p); |
||||
found_first: |
||||
tmp |= ~0U << size; |
||||
found_middle: |
||||
return result + ffz(tmp); |
||||
} |
||||
|
||||
/* Bitmap functions for the minix filesystem. */ |
||||
#define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr) |
||||
#define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr)) |
||||
#define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr) |
||||
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr) |
||||
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size) |
||||
|
||||
#endif /* _PPC_BITOPS_H */ |
@ -0,0 +1,168 @@ |
||||
/*
|
||||
* MPC8260 I/O port pin manipulation functions |
||||
*/ |
||||
|
||||
#ifndef _ASM_IOPIN_8260_H_ |
||||
#define _ASM_IOPIN_8260_H_ |
||||
|
||||
#include <linux/types.h> |
||||
#include <asm/immap_8260.h> |
||||
|
||||
#ifdef __KERNEL__ |
||||
|
||||
typedef |
||||
struct { |
||||
u_char port:2; /* port number (A=0, B=1, C=2, D=3) */ |
||||
u_char pin:5; /* port pin (0-31) */ |
||||
u_char flag:1; /* for whatever */ |
||||
} |
||||
iopin_t; |
||||
|
||||
#define IOPIN_PORTA 0 |
||||
#define IOPIN_PORTB 1 |
||||
#define IOPIN_PORTC 2 |
||||
#define IOPIN_PORTD 3 |
||||
|
||||
extern __inline__ void |
||||
iopin_set_high(iopin_t *iopin) |
||||
{ |
||||
volatile uint *datp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdata; |
||||
datp[iopin->port * 8] |= (1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_low(iopin_t *iopin) |
||||
{ |
||||
volatile uint *datp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdata; |
||||
datp[iopin->port * 8] &= ~(1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_high(iopin_t *iopin) |
||||
{ |
||||
volatile uint *datp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdata; |
||||
return (datp[iopin->port * 8] >> (31 - iopin->pin)) & 1; |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_low(iopin_t *iopin) |
||||
{ |
||||
volatile uint *datp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdata; |
||||
return ((datp[iopin->port * 8] >> (31 - iopin->pin)) & 1) ^ 1; |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_out(iopin_t *iopin) |
||||
{ |
||||
volatile uint *dirp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdira; |
||||
dirp[iopin->port * 8] |= (1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_in(iopin_t *iopin) |
||||
{ |
||||
volatile uint *dirp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdira; |
||||
dirp[iopin->port * 8] &= ~(1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_out(iopin_t *iopin) |
||||
{ |
||||
volatile uint *dirp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdira; |
||||
return (dirp[iopin->port * 8] >> (31 - iopin->pin)) & 1; |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_in(iopin_t *iopin) |
||||
{ |
||||
volatile uint *dirp = &((immap_t *)CFG_IMMR)->im_ioport.iop_pdira; |
||||
return ((dirp[iopin->port * 8] >> (31 - iopin->pin)) & 1) ^ 1; |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_odr(iopin_t *iopin) |
||||
{ |
||||
volatile uint *odrp = &((immap_t *)CFG_IMMR)->im_ioport.iop_podra; |
||||
odrp[iopin->port * 8] |= (1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_act(iopin_t *iopin) |
||||
{ |
||||
volatile uint *odrp = &((immap_t *)CFG_IMMR)->im_ioport.iop_podra; |
||||
odrp[iopin->port * 8] &= ~(1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_odr(iopin_t *iopin) |
||||
{ |
||||
volatile uint *odrp = &((immap_t *)CFG_IMMR)->im_ioport.iop_podra; |
||||
return (odrp[iopin->port * 8] >> (31 - iopin->pin)) & 1; |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_act(iopin_t *iopin) |
||||
{ |
||||
volatile uint *odrp = &((immap_t *)CFG_IMMR)->im_ioport.iop_podra; |
||||
return ((odrp[iopin->port * 8] >> (31 - iopin->pin)) & 1) ^ 1; |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_ded(iopin_t *iopin) |
||||
{ |
||||
volatile uint *parp = &((immap_t *)CFG_IMMR)->im_ioport.iop_ppara; |
||||
parp[iopin->port * 8] |= (1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_gen(iopin_t *iopin) |
||||
{ |
||||
volatile uint *parp = &((immap_t *)CFG_IMMR)->im_ioport.iop_ppara; |
||||
parp[iopin->port * 8] &= ~(1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_ded(iopin_t *iopin) |
||||
{ |
||||
volatile uint *parp = &((immap_t *)CFG_IMMR)->im_ioport.iop_ppara; |
||||
return (parp[iopin->port * 8] >> (31 - iopin->pin)) & 1; |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_gen(iopin_t *iopin) |
||||
{ |
||||
volatile uint *parp = &((immap_t *)CFG_IMMR)->im_ioport.iop_ppara; |
||||
return ((parp[iopin->port * 8] >> (31 - iopin->pin)) & 1) ^ 1; |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_opt2(iopin_t *iopin) |
||||
{ |
||||
volatile uint *sorp = &((immap_t *)CFG_IMMR)->im_ioport.iop_psora; |
||||
sorp[iopin->port * 8] |= (1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ void |
||||
iopin_set_opt1(iopin_t *iopin) |
||||
{ |
||||
volatile uint *sorp = &((immap_t *)CFG_IMMR)->im_ioport.iop_psora; |
||||
sorp[iopin->port * 8] &= ~(1 << (31 - iopin->pin)); |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_opt2(iopin_t *iopin) |
||||
{ |
||||
volatile uint *sorp = &((immap_t *)CFG_IMMR)->im_ioport.iop_psora; |
||||
return (sorp[iopin->port * 8] >> (31 - iopin->pin)) & 1; |
||||
} |
||||
|
||||
extern __inline__ uint |
||||
iopin_is_opt1(iopin_t *iopin) |
||||
{ |
||||
volatile uint *sorp = &((immap_t *)CFG_IMMR)->im_ioport.iop_psora; |
||||
return ((sorp[iopin->port * 8] >> (31 - iopin->pin)) & 1) ^ 1; |
||||
} |
||||
|
||||
#endif /* __KERNEL__ */ |
||||
|
||||
#endif /* _ASM_IOPIN_8260_H_ */ |
@ -0,0 +1,23 @@ |
||||
<?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
|
||||
<?php |
||||
// (C) Copyright 2001 |
||||
// Murray Jensen <Murray.Jensen@cmst.csiro.au> |
||||
// CSIRO Manufacturing Science and Technology, Preston Lab |
||||
|
||||
require("defs.php"); |
||||
pg_head("$bddb_label - Unknown Submit Type"); |
||||
?> |
||||
<center> |
||||
<font size="+4"> |
||||
<b> |
||||
The <?php echo "$bddb_label"; ?> form was submitted with an
|
||||
unknown SUBMIT type <?php echo "(value was '$submit')" ?>.
|
||||
<br></br> |
||||
Perhaps you typed the URL in directly? Click here to go to the |
||||
home page of the <a href="index.php"><?php echo "$bddb_label"; ?></a>.
|
||||
</b> |
||||
</font> |
||||
</center> |
||||
<?php |
||||
pg_foot(); |
||||
?> |
Loading…
Reference in new issue