From ee72b3bbc6885628466bab093b181778bdfde974 Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Sat, 12 Jul 2008 23:01:49 +0000 Subject: Make the TCC780x NAND driver also build for 77x targets. This is work-in-progress stuff and does not yet work fully on 77x, but it's a step in the right direction. Also replace some magic numbers with #defines. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18019 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/tcc77x/ata-nand-target.h | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 firmware/target/arm/tcc77x/ata-nand-target.h (limited to 'firmware/target/arm/tcc77x/ata-nand-target.h') diff --git a/firmware/target/arm/tcc77x/ata-nand-target.h b/firmware/target/arm/tcc77x/ata-nand-target.h new file mode 100644 index 0000000000..93139a16d5 --- /dev/null +++ b/firmware/target/arm/tcc77x/ata-nand-target.h @@ -0,0 +1,33 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 Dave Chapman + * + * 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 software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef ATA_TARGET_H +#define ATA_TARGET_H + +/* GPIOs */ + +#define NAND_GPIO_SET(n) GPIOC |= n +#define NAND_GPIO_CLEAR(n) GPIOC &= (~n) +#define NAND_GPIO_OUT_EN(n) GPIOC_DIR |= n + +#define CS_GPIO_BIT (1<<24) /* Chip Select */ +#define WE_GPIO_BIT (1<<25) /* Write Enable */ + +#endif -- cgit v1.2.3