1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-01 10:41:53 +02:00

cleanup-qi_lb60.h

This commit is contained in:
Xiangfu Liu 2009-09-20 01:56:27 +08:00 committed by Xiangfu Liu
parent cd6b976c21
commit 65051a9ad5

View File

@ -0,0 +1,86 @@
diff --git a/arch/mips/include/asm/mach-jz4740/board-qi_lb60.h b/arch/mips/include/asm/mach-jz4740/board-qi_lb60.h
index b2f02f4..2c3260f 100644
--- a/arch/mips/include/asm/mach-jz4740/board-qi_lb60.h
+++ b/arch/mips/include/asm/mach-jz4740/board-qi_lb60.h
@@ -1,49 +1,57 @@
/*
- * linux/include/asm-mips/mach-jz4740/board-qi_lb60.h
- *
- * Copyright (c) 2009 Qi Hardware inc.,
+ * Copyright (c) 2009 Qi Hardware Inc.,
* Author: Xiangfu Liu <xiangfu@qi-hardware.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ASM_JZ4740_QI_LB60_H__
#define __ASM_JZ4740_QI_LB60_H__
+#include <linux/gpio.h>
/*
* Frequencies of on-board oscillators
*/
#define JZ_EXTAL 12000000 /* Main extal freq: 12 MHz */
-#define JZ_EXTAL2 32768 /* RTC extal freq: 32.768 KHz */
+#define JZ_EXTAL_RTC 32768 /* RTC extal freq: 32.768 KHz */
/*
* GPIO
*/
-#define GPIO_DC_DETE_N (2 * 32 + 26)
-#define GPIO_CHARG_STAT_N (2 * 32 + 27)
-#define GPIO_LED_EN (2 * 32 + 28)
-#define GPIO_LCD_CS (2 * 32 + 21)
-#define GPIO_DISP_OFF_N (3 * 32 + 21)
-#define GPIO_PWM (3 * 32 + 27)
+#define GPIO_DC_DETE_N JZ_GPIO_PORTC(26)
+#define GPIO_CHARG_STAT_N JZ_GPIO_PORTC(27)
+#define GPIO_LED_EN JZ_GPIO_PORTC(28)
+#define GPIO_LCD_CS JZ_GPIO_PORTC(21)
+#define GPIO_DISP_OFF_N JZ_GPIO_PORTD(21)
+#define GPIO_PWM JZ_GPIO_PORTD(27)
-#define GPIO_AMP_EN (3 * 32 + 4)
+#define GPIO_AMP_EN JZ_GPIO_PORTD(4)
-#define GPIO_SD_CD_N (3 * 32 + 0)
-#define GPIO_SD_VCC_EN_N (3 * 32 + 2)
-#define GPIO_SD_WP (3 * 32 + 16)
+#define GPIO_SD_CD_N JZ_GPIO_PORTD(0)
+#define GPIO_SD_VCC_EN_N JZ_GPIO_PORTD(2)
+#define GPIO_SD_WP JZ_GPIO_PORTD(16)
-#define GPIO_USB_DETE (3 * 32 + 28)
-#define GPIO_BUZZ_PWM (3 * 32 + 27)
+#define GPIO_USB_DETE JZ_GPIO_PORTD(28)
+#define GPIO_BUZZ_PWM JZ_GPIO_PORTD(27)
#define GPIO_UDC_HOTPLUG GPIO_USB_DETE
-#define GPIO_AUDIO_POP (1 * 32 + 29)
-#define GPIO_COB_TEST (1 * 32 + 30)
+#define GPIO_AUDIO_POP JZ_GPIO_PORTB(29)
+#define GPIO_COB_TEST JZ_GPIO_PORTB(30)
-#define GPIO_KEYOUT_BASE (2 * 32 + 10)
-#define GPIO_KEYIN_BASE (3 * 32 + 18)
-#define GPIO_KEYIN_8 (3 * 32 + 26)
+#define GPIO_KEYOUT_BASE JZ_GPIO_PORTC(10)
+#define GPIO_KEYIN_BASE JZ_GPIO_PORTD(18)
+#define GPIO_KEYIN_8 JZ_GPIO_PORTD(26)
/*
* MMC/SD