MIPS: Add VCT board series support (Part 2/3)
PATCH v2 2/3 MIPS: Add VCT board series support (Part 2/3)
This patch adds support for the Micronas VCT board series. Currently the following platforms are supported:
vct_premium
vct_premium_small
vct_premium_onenand
vct_premium_onenand_small
vct_platinum
vct_platinum_small
vct_platinum_onenand
vct_platinum_onenand_small
vct_platinumavc
vct_platinumavc_small
vct_platinumavc_onenand
vct_platinumavc_onenand_small
One speciality of the VCT board is that it can't access NOR FLASH memory-mapped. It has to use special access functions for this.
---
v2:
- No changes
board/micronas/vct/ebi.h | 95 +++++++++++ board/micronas/vct/vct.h | 97 +++++++++++ board/micronas/vct/vcth/reg_dcgu.h | 25 +++ board/micronas/vct/vcth/reg_ebi.h | 242 ++++++++++++++++++++++++++ board/micronas/vct/vcth/reg_fwsram.h | 73 ++++++++ board/micronas/vct/vcth/reg_gpio.h | 32 ++++ board/micronas/vct/vcth/reg_wdt.h | 24 +++ board/micronas/vct/vcth2/reg_ebi.h | 290 +++++++++++++++++++++++++++++++ board/micronas/vct/vctv/reg_dcgu.h | 25 +++ board/micronas/vct/vctv/reg_ebi.h | 290 +++++++++++++++++++++++++++++++ board/micronas/vct/vctv/reg_gpio.h | 32 ++++ board/micronas/vct/vctv/reg_wdt.h | 24 +++ include/configs/vct.h | 310 ++++++++++++++++++++++++++++++++++ 13 files changed, 1559 insertions(+), 0 deletions(-) create mode 100644 board/micronas/vct/ebi.h create mode 100644 board/micronas/vct/vct.h create mode 100644 board/micronas/vct/vcth/reg_dcgu.h create mode 100644 board/micronas/vct/vcth/reg_ebi.h create mode 100644 board/micronas/vct/vcth/reg_fwsram.h create mode 100644 board/micronas/vct/vcth/reg_gpio.h create mode 100644 board/micronas/vct/vcth/reg_wdt.h create mode 100644 board/micronas/vct/vcth2/reg_ebi.h create mode 100644 board/micronas/vct/vctv/reg_dcgu.h create mode 100644 board/micronas/vct/vctv/reg_ebi.h create mode 100644 board/micronas/vct/vctv/reg_gpio.h create mode 100644 board/micronas/vct/vctv/reg_wdt.h create mode 100644 include/configs/vct.h
board/micronas/vct/ebi.h new file +95 -0
@@ -0,0 +1,95 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 __EBI__ +#define __EBI__ + +#include <common.h> +#include <asm/io.h> +#include "vct.h" + +#define EXT_DEVICE_CHANNEL_3 (0x30000000) +#define EXT_DEVICE_CHANNEL_2 (0x20000000) +#define EXT_DEVICE_CHANNEL_1 (0x10000000) +#define EXT_CPU_ACCESS_ACTIVE (0x00000001) +#define EXT_DMA_ACCESS_ACTIVE (1 << 14) +#define EXT_CPU_IORDY_SL (0x00000001) + +#define EBI_CPU_WRITE (1 << 31) +#define EBI_CPU_ID_SHIFT (28) +#define EBI_CPU_ADDR_MASK ~(~0UL << EBI_CPU_ID_SHIFT) + +/* position of various bit slices in timing register EBI_DEV[01]_TIM1_RD1 */ +#define ADDR_LATCH_ENABLE 0 +#define ADDR_ACTIVATION 4 +#define CHIP_SELECT_START 8 +#define OUTPUT_ENABLE_START 12 +#define WAIT_TIME 28 +#define READ_DURATION 20 + +/* position of various bit slices in timing register EBI_DEV[01]_TIM1_RD2 */ +#define OUTPUT_ENABLE_END 0 +#define CHIP_SELECT_END 4 +#define ADDR_DEACTIVATION 8 +#define RECOVER_TIME 12 +#define ACK_TIME 20 + +/* various bits in configuration register EBI_DEV[01]_CONFIG1 */ +#define EBI_EXTERNAL_DATA_8 (1 << 8) +#define EBI_EXT_ADDR_SHIFT (1 << 22) +#define EBI_EXTERNAL_DATA_16 EBI_EXT_ADDR_SHIFT +#define EBI_CHIP_SELECT_1 0x2 +#define EBI_CHIP_SELECT_2 0x4 +#define EBI_BUSY_EN_RD (1 << 12) +#define DIR_ACCESS_WRITE (1 << 20) +#define DIR_ACCESS_MASK (1 << 20) + +/* various bits in configuration register EBI_DEV[01]_CONFIG2 */ +#define ADDRESS_INCREMENT_ON 0x0 +#define ADDRESS_INCREMENT_OFF 0x100 +#define QUEUE_LENGTH_1 0x40 +#define QUEUE_LENGTH_2 0x80 +#define QUEUE_LENGTH_3 0xC0 +#define QUEUE_LENGTH_4 0 +#define CPU_TRANSFER_SIZE_32 0 +#define CPU_TRANSFER_SIZE_16 0x10 +#define CPU_TRANSFER_SIZE_8 0x20 +#define READ_ENDIANNESS_ABCD 0 +#define READ_ENDIANNESS_DCBA 0x4 +#define READ_ENDIANNESS_BADC 0x8 +#define READ_ENDIANNESS_CDAB 0xC +#define WRITE_ENDIANNESS_ABCD 0 +#define WRITE_ENDIANNESS_DCBA 0x1 +#define WRITE_ENDIANNESS_BADC 0x2 +#define WRITE_ENDIANNESS_CDAB 0x3 + +/* various bits in configuration register EBI_CTRL_SIG_ACTLV */ +#define IORDY_ACTIVELEVEL_HIGH (1 << 14) +#define ALE_ACTIVELEVEL_HIGH (1 << 8) + +/* bits in register EBI_SIG_LEVEL */ +#define IORDY_LEVEL_MASK 1 + +static inline void ebi_wait (void ) +{ +while (reg_read (EBI_STATUS (EBI_BASE )) &EXT_CPU_ACCESS_ACTIVE ) + ;/* wait */ +} + +#endif
board/micronas/vct/vct.h new file +97 -0
97 lines not on this page · raw message
board/micronas/vct/vcth/reg_dcgu.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define DCGU_BASE 0x00084000 +#define DCGU_EN_WDT_RESET_OFFS 0x00000064 +#define DCGU_EN_WDT_RESET (base) ((base) + DCGU_EN_WDT_RESET_OFFS) + +/* The magic value to write in order to activate the WDT */ +#define DCGU_MAGIC_WDT 0x1909
board/micronas/vct/vcth/reg_ebi.h new file +242 -0
242 lines not on this page · raw message
board/micronas/vct/vcth/reg_fwsram.h new file +73 -0
73 lines not on this page · raw message
board/micronas/vct/vcth/reg_gpio.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define GPIO1_BASE 0x00088000 +#define GPIO2_BASE 0x0008c000 + +/* Instances */ +#define GPIO_INSTANCES 2 + +/* Relative offsets of the register adresses */ +#define GPIO_SWPORTA_DR_OFFS 0x00000000 +#define GPIO_SWPORTA_DR (base) ((base) + GPIO_SWPORTA_DR_OFFS) +#define GPIO_SWPORTA_DDR_OFFS 0x00000004 +#define GPIO_SWPORTA_DDR (base) ((base) + GPIO_SWPORTA_DDR_OFFS) +#define GPIO_EXT_PORTA_OFFS 0x00000050 +#define GPIO_EXT_PORTA (base) ((base) + GPIO_EXT_PORTA_OFFS)
board/micronas/vct/vcth/reg_wdt.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define WDT_BASE 0x000b0000 +#define WDT_CR_OFFS 0x00000000 +#define WDT_CR (base) ((base) + WDT_CR_OFFS) +#define WDT_TORR_OFFS 0x00000004 +#define WDT_TORR (base) ((base) + WDT_TORR_OFFS)
board/micronas/vct/vcth2/reg_ebi.h new file +290 -0
290 lines not on this page · raw message
board/micronas/vct/vctv/reg_dcgu.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define DCGU_BASE 0x0004c000 +#define DCGU_EN_WDT_RESET_OFFS 0x000000FC +#define DCGU_EN_WDT_RESET (base) ((base) + DCGU_EN_WDT_RESET_OFFS) + +/* The magic value to write in order to activate the WDT */ +#define DCGU_MAGIC_WDT 0x1909
board/micronas/vct/vctv/reg_ebi.h new file +290 -0
290 lines not on this page · raw message
board/micronas/vct/vctv/reg_gpio.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define GPIO1_BASE 0x00044000 +#define GPIO2_BASE 0x00048000 + +/* Instances */ +#define GPIO_INSTANCES 2 + +/* Relative offsets of the register adresses */ +#define GPIO_SWPORTA_DR_OFFS 0x00000000 +#define GPIO_SWPORTA_DR (base) ((base) + GPIO_SWPORTA_DR_OFFS) +#define GPIO_SWPORTA_DDR_OFFS 0x00000004 +#define GPIO_SWPORTA_DDR (base) ((base) + GPIO_SWPORTA_DDR_OFFS) +#define GPIO_EXT_PORTA_OFFS 0x00000050 +#define GPIO_EXT_PORTA (base) ((base) + GPIO_EXT_PORTA_OFFS)
board/micronas/vct/vctv/reg_wdt.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +* +* 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 +*/ + +#define WDT_BASE 0x00040000 +#define WDT_CR_OFFS 0x00000000 +#define WDT_CR (base) ((base) + WDT_CR_OFFS) +#define WDT_TORR_OFFS 0x00000004 +#define WDT_TORR (base) ((base) + WDT_TORR_OFFS)
include/configs/vct.h new file +310 -0
310 lines not on this page · raw message
Signature · 1 line
1.6.1