* [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/
@ 2011-02-16 9:10 Po-Yu Chuang
2011-02-16 9:23 ` Macpaul Lin
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
0 siblings, 2 replies; 9+ messages in thread
From: Po-Yu Chuang @ 2011-02-16 9:10 UTC (permalink / raw)
To: u-boot
From: Po-Yu Chuang <ratbert@faraday-tech.com>
Also add API declarations.
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
drivers/power/ftpmu010.c | 2 +-
drivers/power/ftpmu010.h | 146 --------------------------------------------
include/ftpmu010.h | 150 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 151 insertions(+), 147 deletions(-)
delete mode 100644 drivers/power/ftpmu010.h
create mode 100644 include/ftpmu010.h
diff --git a/drivers/power/ftpmu010.c b/drivers/power/ftpmu010.c
index 7924ac1..dc4ca5d 100644
--- a/drivers/power/ftpmu010.c
+++ b/drivers/power/ftpmu010.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/io.h>
-#include "ftpmu010.h"
+#include <ftpmu010.h>
static struct ftpmu010 *pmu = (struct ftpmu010 *)CONFIG_FTPMU010_BASE;
diff --git a/drivers/power/ftpmu010.h b/drivers/power/ftpmu010.h
deleted file mode 100644
index 8ef7a37..0000000
--- a/drivers/power/ftpmu010.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * (C) Copyright 2009 Faraday Technology
- * Po-Yu Chuang <ratbert@faraday-tech.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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * Power Management Unit
- */
-#ifndef __FTPMU010_H
-#define __FTPMU010_H
-
-struct ftpmu010 {
- unsigned int IDNMBR0; /* 0x00 */
- unsigned int reserved0; /* 0x04 */
- unsigned int OSCC; /* 0x08 */
- unsigned int PMODE; /* 0x0C */
- unsigned int PMCR; /* 0x10 */
- unsigned int PED; /* 0x14 */
- unsigned int PEDSR; /* 0x18 */
- unsigned int reserved1; /* 0x1C */
- unsigned int PMSR; /* 0x20 */
- unsigned int PGSR; /* 0x24 */
- unsigned int MFPSR; /* 0x28 */
- unsigned int MISC; /* 0x2C */
- unsigned int PDLLCR0; /* 0x30 */
- unsigned int PDLLCR1; /* 0x34 */
- unsigned int AHBMCLKOFF; /* 0x38 */
- unsigned int APBMCLKOFF; /* 0x3C */
- unsigned int DCSRCR0; /* 0x40 */
- unsigned int DCSRCR1; /* 0x44 */
- unsigned int DCSRCR2; /* 0x48 */
- unsigned int SDRAMHTC; /* 0x4C */
- unsigned int PSPR0; /* 0x50 */
- unsigned int PSPR1; /* 0x54 */
- unsigned int PSPR2; /* 0x58 */
- unsigned int PSPR3; /* 0x5C */
- unsigned int PSPR4; /* 0x60 */
- unsigned int PSPR5; /* 0x64 */
- unsigned int PSPR6; /* 0x68 */
- unsigned int PSPR7; /* 0x6C */
- unsigned int PSPR8; /* 0x70 */
- unsigned int PSPR9; /* 0x74 */
- unsigned int PSPR10; /* 0x78 */
- unsigned int PSPR11; /* 0x7C */
- unsigned int PSPR12; /* 0x80 */
- unsigned int PSPR13; /* 0x84 */
- unsigned int PSPR14; /* 0x88 */
- unsigned int PSPR15; /* 0x8C */
- unsigned int AHBDMA_RACCS; /* 0x90 */
- unsigned int reserved2; /* 0x94 */
- unsigned int reserved3; /* 0x98 */
- unsigned int JSS; /* 0x9C */
- unsigned int CFC_RACC; /* 0xA0 */
- unsigned int SSP1_RACC; /* 0xA4 */
- unsigned int UART1TX_RACC; /* 0xA8 */
- unsigned int UART1RX_RACC; /* 0xAC */
- unsigned int UART2TX_RACC; /* 0xB0 */
- unsigned int UART2RX_RACC; /* 0xB4 */
- unsigned int SDC_RACC; /* 0xB8 */
- unsigned int I2SAC97_RACC; /* 0xBC */
- unsigned int IRDATX_RACC; /* 0xC0 */
- unsigned int reserved4; /* 0xC4 */
- unsigned int USBD_RACC; /* 0xC8 */
- unsigned int IRDARX_RACC; /* 0xCC */
- unsigned int IRDA_RACC; /* 0xD0 */
- unsigned int ED0_RACC; /* 0xD4 */
- unsigned int ED1_RACC; /* 0xD8 */
-};
-
-/*
- * ID Number 0 Register
- */
-#define FTPMU010_ID_A320A 0x03200000
-#define FTPMU010_ID_A320C 0x03200010
-#define FTPMU010_ID_A320D 0x03200030
-
-/*
- * OSC Control Register
- */
-#define FTPMU010_OSCC_OSCH_TRI (1 << 11)
-#define FTPMU010_OSCC_OSCH_STABLE (1 << 9)
-#define FTPMU010_OSCC_OSCH_OFF (1 << 8)
-
-#define FTPMU010_OSCC_OSCL_TRI (1 << 3)
-#define FTPMU010_OSCC_OSCL_RTCLSEL (1 << 2)
-#define FTPMU010_OSCC_OSCL_STABLE (1 << 1)
-#define FTPMU010_OSCC_OSCL_OFF (1 << 0)
-
-/*
- * Power Mode Register
- */
-#define FTPMU010_PMODE_DIVAHBCLK_MASK (0x7 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_2 (0x0 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_3 (0x1 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_4 (0x2 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_6 (0x3 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_8 (0x4 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK(pmode) (((pmode) >> 4) & 0x7)
-#define FTPMU010_PMODE_FCS (1 << 2)
-#define FTPMU010_PMODE_TURBO (1 << 1)
-#define FTPMU010_PMODE_SLEEP (1 << 0)
-
-/*
- * Power Manager Status Register
- */
-#define FTPMU010_PMSR_SMR (1 << 10)
-
-#define FTPMU010_PMSR_RDH (1 << 2)
-#define FTPMU010_PMSR_PH (1 << 1)
-#define FTPMU010_PMSR_CKEHLOW (1 << 0)
-
-/*
- * Multi-Function Port Setting Register
- */
-#define FTPMU010_MFPSR_MODEMPINSEL (1 << 14)
-#define FTPMU010_MFPSR_AC97CLKOUTSEL (1 << 13)
-#define FTPMU010_MFPSR_AC97PINSEL (1 << 3)
-
-/*
- * PLL/DLL Control Register 0
- */
-#define FTPMU010_PDLLCR0_HCLKOUTDIS(cr0) (((cr0) >> 20) & 0xf)
-#define FTPMU010_PDLLCR0_DLLFRAG (1 << 19)
-#define FTPMU010_PDLLCR0_DLLSTSEL (1 << 18)
-#define FTPMU010_PDLLCR0_DLLSTABLE (1 << 17)
-#define FTPMU010_PDLLCR0_DLLDIS (1 << 16)
-#define FTPMU010_PDLLCR0_PLL1NS(cr0) (((cr0) >> 3) & 0x1ff)
-#define FTPMU010_PDLLCR0_PLL1STSEL (1 << 2)
-#define FTPMU010_PDLLCR0_PLL1STABLE (1 << 1)
-#define FTPMU010_PDLLCR0_PLL1DIS (1 << 0)
-
-#endif /* __FTPMU010_H */
diff --git a/include/ftpmu010.h b/include/ftpmu010.h
new file mode 100644
index 0000000..640f056
--- /dev/null
+++ b/include/ftpmu010.h
@@ -0,0 +1,150 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Power Management Unit
+ */
+#ifndef __FTPMU010_H
+#define __FTPMU010_H
+
+struct ftpmu010 {
+ unsigned int IDNMBR0; /* 0x00 */
+ unsigned int reserved0; /* 0x04 */
+ unsigned int OSCC; /* 0x08 */
+ unsigned int PMODE; /* 0x0C */
+ unsigned int PMCR; /* 0x10 */
+ unsigned int PED; /* 0x14 */
+ unsigned int PEDSR; /* 0x18 */
+ unsigned int reserved1; /* 0x1C */
+ unsigned int PMSR; /* 0x20 */
+ unsigned int PGSR; /* 0x24 */
+ unsigned int MFPSR; /* 0x28 */
+ unsigned int MISC; /* 0x2C */
+ unsigned int PDLLCR0; /* 0x30 */
+ unsigned int PDLLCR1; /* 0x34 */
+ unsigned int AHBMCLKOFF; /* 0x38 */
+ unsigned int APBMCLKOFF; /* 0x3C */
+ unsigned int DCSRCR0; /* 0x40 */
+ unsigned int DCSRCR1; /* 0x44 */
+ unsigned int DCSRCR2; /* 0x48 */
+ unsigned int SDRAMHTC; /* 0x4C */
+ unsigned int PSPR0; /* 0x50 */
+ unsigned int PSPR1; /* 0x54 */
+ unsigned int PSPR2; /* 0x58 */
+ unsigned int PSPR3; /* 0x5C */
+ unsigned int PSPR4; /* 0x60 */
+ unsigned int PSPR5; /* 0x64 */
+ unsigned int PSPR6; /* 0x68 */
+ unsigned int PSPR7; /* 0x6C */
+ unsigned int PSPR8; /* 0x70 */
+ unsigned int PSPR9; /* 0x74 */
+ unsigned int PSPR10; /* 0x78 */
+ unsigned int PSPR11; /* 0x7C */
+ unsigned int PSPR12; /* 0x80 */
+ unsigned int PSPR13; /* 0x84 */
+ unsigned int PSPR14; /* 0x88 */
+ unsigned int PSPR15; /* 0x8C */
+ unsigned int AHBDMA_RACCS; /* 0x90 */
+ unsigned int reserved2; /* 0x94 */
+ unsigned int reserved3; /* 0x98 */
+ unsigned int JSS; /* 0x9C */
+ unsigned int CFC_RACC; /* 0xA0 */
+ unsigned int SSP1_RACC; /* 0xA4 */
+ unsigned int UART1TX_RACC; /* 0xA8 */
+ unsigned int UART1RX_RACC; /* 0xAC */
+ unsigned int UART2TX_RACC; /* 0xB0 */
+ unsigned int UART2RX_RACC; /* 0xB4 */
+ unsigned int SDC_RACC; /* 0xB8 */
+ unsigned int I2SAC97_RACC; /* 0xBC */
+ unsigned int IRDATX_RACC; /* 0xC0 */
+ unsigned int reserved4; /* 0xC4 */
+ unsigned int USBD_RACC; /* 0xC8 */
+ unsigned int IRDARX_RACC; /* 0xCC */
+ unsigned int IRDA_RACC; /* 0xD0 */
+ unsigned int ED0_RACC; /* 0xD4 */
+ unsigned int ED1_RACC; /* 0xD8 */
+};
+
+/*
+ * ID Number 0 Register
+ */
+#define FTPMU010_ID_A320A 0x03200000
+#define FTPMU010_ID_A320C 0x03200010
+#define FTPMU010_ID_A320D 0x03200030
+
+/*
+ * OSC Control Register
+ */
+#define FTPMU010_OSCC_OSCH_TRI (1 << 11)
+#define FTPMU010_OSCC_OSCH_STABLE (1 << 9)
+#define FTPMU010_OSCC_OSCH_OFF (1 << 8)
+
+#define FTPMU010_OSCC_OSCL_TRI (1 << 3)
+#define FTPMU010_OSCC_OSCL_RTCLSEL (1 << 2)
+#define FTPMU010_OSCC_OSCL_STABLE (1 << 1)
+#define FTPMU010_OSCC_OSCL_OFF (1 << 0)
+
+/*
+ * Power Mode Register
+ */
+#define FTPMU010_PMODE_DIVAHBCLK_MASK (0x7 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_2 (0x0 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_3 (0x1 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_4 (0x2 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_6 (0x3 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_8 (0x4 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK(pmode) (((pmode) >> 4) & 0x7)
+#define FTPMU010_PMODE_FCS (1 << 2)
+#define FTPMU010_PMODE_TURBO (1 << 1)
+#define FTPMU010_PMODE_SLEEP (1 << 0)
+
+/*
+ * Power Manager Status Register
+ */
+#define FTPMU010_PMSR_SMR (1 << 10)
+
+#define FTPMU010_PMSR_RDH (1 << 2)
+#define FTPMU010_PMSR_PH (1 << 1)
+#define FTPMU010_PMSR_CKEHLOW (1 << 0)
+
+/*
+ * Multi-Function Port Setting Register
+ */
+#define FTPMU010_MFPSR_MODEMPINSEL (1 << 14)
+#define FTPMU010_MFPSR_AC97CLKOUTSEL (1 << 13)
+#define FTPMU010_MFPSR_AC97PINSEL (1 << 3)
+
+/*
+ * PLL/DLL Control Register 0
+ */
+#define FTPMU010_PDLLCR0_HCLKOUTDIS(cr0) (((cr0) >> 20) & 0xf)
+#define FTPMU010_PDLLCR0_DLLFRAG (1 << 19)
+#define FTPMU010_PDLLCR0_DLLSTSEL (1 << 18)
+#define FTPMU010_PDLLCR0_DLLSTABLE (1 << 17)
+#define FTPMU010_PDLLCR0_DLLDIS (1 << 16)
+#define FTPMU010_PDLLCR0_PLL1NS(cr0) (((cr0) >> 3) & 0x1ff)
+#define FTPMU010_PDLLCR0_PLL1STSEL (1 << 2)
+#define FTPMU010_PDLLCR0_PLL1STABLE (1 << 1)
+#define FTPMU010_PDLLCR0_PLL1DIS (1 << 0)
+
+void ftpmu010_32768osc_enable(void);
+void ftpmu010_dlldis_disable(void);
+void ftpmu010_sdram_clk_disable(unsigned int cr0);
+
+#endif /* __FTPMU010_H */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/
2011-02-16 9:10 [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/ Po-Yu Chuang
@ 2011-02-16 9:23 ` Macpaul Lin
2011-02-16 9:36 ` Po-Yu Chuang
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
1 sibling, 1 reply; 9+ messages in thread
From: Macpaul Lin @ 2011-02-16 9:23 UTC (permalink / raw)
To: u-boot
Hi Po-Yu,
2011/2/16 Po-Yu Chuang <ratbert.chuang@gmail.com>:
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>
> Also add API declarations.
>
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> ?drivers/power/ftpmu010.c | ? ?2 +-
> ?drivers/power/ftpmu010.h | ?146 --------------------------------------------
> ?include/ftpmu010.h ? ? ? | ?150 ++++++++++++++++++++++++++++++++++++++++++++++
> ?3 files changed, 151 insertions(+), 147 deletions(-)
> ?delete mode 100644 drivers/power/ftpmu010.h
> ?create mode 100644 include/ftpmu010.h
Just one comment which has been replied earlier in the previous discuss.
Put ftpmu010.h into "include/faraday" instead of "include".
--
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/
2011-02-16 9:23 ` Macpaul Lin
@ 2011-02-16 9:36 ` Po-Yu Chuang
0 siblings, 0 replies; 9+ messages in thread
From: Po-Yu Chuang @ 2011-02-16 9:36 UTC (permalink / raw)
To: u-boot
Hi Macpaul,
On Wed, Feb 16, 2011 at 5:23 PM, Macpaul Lin <macpaul@gmail.com> wrote:
> Hi Po-Yu,
>
> 2011/2/16 Po-Yu Chuang <ratbert.chuang@gmail.com>:
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> Also add API declarations.
>>
>> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
>> ---
>> ?drivers/power/ftpmu010.c | ? ?2 +-
>> ?drivers/power/ftpmu010.h | ?146 --------------------------------------------
>> ?include/ftpmu010.h ? ? ? | ?150 ++++++++++++++++++++++++++++++++++++++++++++++
>> ?3 files changed, 151 insertions(+), 147 deletions(-)
>> ?delete mode 100644 drivers/power/ftpmu010.h
>> ?create mode 100644 include/ftpmu010.h
>
> Just one comment which has been replied earlier in the previous discuss.
> Put ftpmu010.h into "include/faraday" instead of "include".
Agree. It will be nicer.
Wolfgang, do you have any comment?
regards,
Po-Yu Chuang
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-02-16 9:10 [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/ Po-Yu Chuang
2011-02-16 9:23 ` Macpaul Lin
@ 2011-02-18 5:34 ` Po-Yu Chuang
2011-02-25 10:14 ` Macpaul Lin
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Po-Yu Chuang @ 2011-02-18 5:34 UTC (permalink / raw)
To: u-boot
From: Po-Yu Chuang <ratbert@faraday-tech.com>
Also add API declarations.
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
v2:
move include/ftpmu010.h to include/faraday/ftpmu010.h
drivers/power/ftpmu010.c | 2 +-
drivers/power/ftpmu010.h | 146 ------------------------------------------
include/faraday/ftpmu010.h | 150 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 151 insertions(+), 147 deletions(-)
delete mode 100644 drivers/power/ftpmu010.h
create mode 100644 include/faraday/ftpmu010.h
diff --git a/drivers/power/ftpmu010.c b/drivers/power/ftpmu010.c
index 7924ac1..c6a8cda 100644
--- a/drivers/power/ftpmu010.c
+++ b/drivers/power/ftpmu010.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/io.h>
-#include "ftpmu010.h"
+#include <faraday/ftpmu010.h>
static struct ftpmu010 *pmu = (struct ftpmu010 *)CONFIG_FTPMU010_BASE;
diff --git a/drivers/power/ftpmu010.h b/drivers/power/ftpmu010.h
deleted file mode 100644
index 8ef7a37..0000000
--- a/drivers/power/ftpmu010.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * (C) Copyright 2009 Faraday Technology
- * Po-Yu Chuang <ratbert@faraday-tech.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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * Power Management Unit
- */
-#ifndef __FTPMU010_H
-#define __FTPMU010_H
-
-struct ftpmu010 {
- unsigned int IDNMBR0; /* 0x00 */
- unsigned int reserved0; /* 0x04 */
- unsigned int OSCC; /* 0x08 */
- unsigned int PMODE; /* 0x0C */
- unsigned int PMCR; /* 0x10 */
- unsigned int PED; /* 0x14 */
- unsigned int PEDSR; /* 0x18 */
- unsigned int reserved1; /* 0x1C */
- unsigned int PMSR; /* 0x20 */
- unsigned int PGSR; /* 0x24 */
- unsigned int MFPSR; /* 0x28 */
- unsigned int MISC; /* 0x2C */
- unsigned int PDLLCR0; /* 0x30 */
- unsigned int PDLLCR1; /* 0x34 */
- unsigned int AHBMCLKOFF; /* 0x38 */
- unsigned int APBMCLKOFF; /* 0x3C */
- unsigned int DCSRCR0; /* 0x40 */
- unsigned int DCSRCR1; /* 0x44 */
- unsigned int DCSRCR2; /* 0x48 */
- unsigned int SDRAMHTC; /* 0x4C */
- unsigned int PSPR0; /* 0x50 */
- unsigned int PSPR1; /* 0x54 */
- unsigned int PSPR2; /* 0x58 */
- unsigned int PSPR3; /* 0x5C */
- unsigned int PSPR4; /* 0x60 */
- unsigned int PSPR5; /* 0x64 */
- unsigned int PSPR6; /* 0x68 */
- unsigned int PSPR7; /* 0x6C */
- unsigned int PSPR8; /* 0x70 */
- unsigned int PSPR9; /* 0x74 */
- unsigned int PSPR10; /* 0x78 */
- unsigned int PSPR11; /* 0x7C */
- unsigned int PSPR12; /* 0x80 */
- unsigned int PSPR13; /* 0x84 */
- unsigned int PSPR14; /* 0x88 */
- unsigned int PSPR15; /* 0x8C */
- unsigned int AHBDMA_RACCS; /* 0x90 */
- unsigned int reserved2; /* 0x94 */
- unsigned int reserved3; /* 0x98 */
- unsigned int JSS; /* 0x9C */
- unsigned int CFC_RACC; /* 0xA0 */
- unsigned int SSP1_RACC; /* 0xA4 */
- unsigned int UART1TX_RACC; /* 0xA8 */
- unsigned int UART1RX_RACC; /* 0xAC */
- unsigned int UART2TX_RACC; /* 0xB0 */
- unsigned int UART2RX_RACC; /* 0xB4 */
- unsigned int SDC_RACC; /* 0xB8 */
- unsigned int I2SAC97_RACC; /* 0xBC */
- unsigned int IRDATX_RACC; /* 0xC0 */
- unsigned int reserved4; /* 0xC4 */
- unsigned int USBD_RACC; /* 0xC8 */
- unsigned int IRDARX_RACC; /* 0xCC */
- unsigned int IRDA_RACC; /* 0xD0 */
- unsigned int ED0_RACC; /* 0xD4 */
- unsigned int ED1_RACC; /* 0xD8 */
-};
-
-/*
- * ID Number 0 Register
- */
-#define FTPMU010_ID_A320A 0x03200000
-#define FTPMU010_ID_A320C 0x03200010
-#define FTPMU010_ID_A320D 0x03200030
-
-/*
- * OSC Control Register
- */
-#define FTPMU010_OSCC_OSCH_TRI (1 << 11)
-#define FTPMU010_OSCC_OSCH_STABLE (1 << 9)
-#define FTPMU010_OSCC_OSCH_OFF (1 << 8)
-
-#define FTPMU010_OSCC_OSCL_TRI (1 << 3)
-#define FTPMU010_OSCC_OSCL_RTCLSEL (1 << 2)
-#define FTPMU010_OSCC_OSCL_STABLE (1 << 1)
-#define FTPMU010_OSCC_OSCL_OFF (1 << 0)
-
-/*
- * Power Mode Register
- */
-#define FTPMU010_PMODE_DIVAHBCLK_MASK (0x7 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_2 (0x0 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_3 (0x1 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_4 (0x2 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_6 (0x3 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK_8 (0x4 << 4)
-#define FTPMU010_PMODE_DIVAHBCLK(pmode) (((pmode) >> 4) & 0x7)
-#define FTPMU010_PMODE_FCS (1 << 2)
-#define FTPMU010_PMODE_TURBO (1 << 1)
-#define FTPMU010_PMODE_SLEEP (1 << 0)
-
-/*
- * Power Manager Status Register
- */
-#define FTPMU010_PMSR_SMR (1 << 10)
-
-#define FTPMU010_PMSR_RDH (1 << 2)
-#define FTPMU010_PMSR_PH (1 << 1)
-#define FTPMU010_PMSR_CKEHLOW (1 << 0)
-
-/*
- * Multi-Function Port Setting Register
- */
-#define FTPMU010_MFPSR_MODEMPINSEL (1 << 14)
-#define FTPMU010_MFPSR_AC97CLKOUTSEL (1 << 13)
-#define FTPMU010_MFPSR_AC97PINSEL (1 << 3)
-
-/*
- * PLL/DLL Control Register 0
- */
-#define FTPMU010_PDLLCR0_HCLKOUTDIS(cr0) (((cr0) >> 20) & 0xf)
-#define FTPMU010_PDLLCR0_DLLFRAG (1 << 19)
-#define FTPMU010_PDLLCR0_DLLSTSEL (1 << 18)
-#define FTPMU010_PDLLCR0_DLLSTABLE (1 << 17)
-#define FTPMU010_PDLLCR0_DLLDIS (1 << 16)
-#define FTPMU010_PDLLCR0_PLL1NS(cr0) (((cr0) >> 3) & 0x1ff)
-#define FTPMU010_PDLLCR0_PLL1STSEL (1 << 2)
-#define FTPMU010_PDLLCR0_PLL1STABLE (1 << 1)
-#define FTPMU010_PDLLCR0_PLL1DIS (1 << 0)
-
-#endif /* __FTPMU010_H */
diff --git a/include/faraday/ftpmu010.h b/include/faraday/ftpmu010.h
new file mode 100644
index 0000000..640f056
--- /dev/null
+++ b/include/faraday/ftpmu010.h
@@ -0,0 +1,150 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Power Management Unit
+ */
+#ifndef __FTPMU010_H
+#define __FTPMU010_H
+
+struct ftpmu010 {
+ unsigned int IDNMBR0; /* 0x00 */
+ unsigned int reserved0; /* 0x04 */
+ unsigned int OSCC; /* 0x08 */
+ unsigned int PMODE; /* 0x0C */
+ unsigned int PMCR; /* 0x10 */
+ unsigned int PED; /* 0x14 */
+ unsigned int PEDSR; /* 0x18 */
+ unsigned int reserved1; /* 0x1C */
+ unsigned int PMSR; /* 0x20 */
+ unsigned int PGSR; /* 0x24 */
+ unsigned int MFPSR; /* 0x28 */
+ unsigned int MISC; /* 0x2C */
+ unsigned int PDLLCR0; /* 0x30 */
+ unsigned int PDLLCR1; /* 0x34 */
+ unsigned int AHBMCLKOFF; /* 0x38 */
+ unsigned int APBMCLKOFF; /* 0x3C */
+ unsigned int DCSRCR0; /* 0x40 */
+ unsigned int DCSRCR1; /* 0x44 */
+ unsigned int DCSRCR2; /* 0x48 */
+ unsigned int SDRAMHTC; /* 0x4C */
+ unsigned int PSPR0; /* 0x50 */
+ unsigned int PSPR1; /* 0x54 */
+ unsigned int PSPR2; /* 0x58 */
+ unsigned int PSPR3; /* 0x5C */
+ unsigned int PSPR4; /* 0x60 */
+ unsigned int PSPR5; /* 0x64 */
+ unsigned int PSPR6; /* 0x68 */
+ unsigned int PSPR7; /* 0x6C */
+ unsigned int PSPR8; /* 0x70 */
+ unsigned int PSPR9; /* 0x74 */
+ unsigned int PSPR10; /* 0x78 */
+ unsigned int PSPR11; /* 0x7C */
+ unsigned int PSPR12; /* 0x80 */
+ unsigned int PSPR13; /* 0x84 */
+ unsigned int PSPR14; /* 0x88 */
+ unsigned int PSPR15; /* 0x8C */
+ unsigned int AHBDMA_RACCS; /* 0x90 */
+ unsigned int reserved2; /* 0x94 */
+ unsigned int reserved3; /* 0x98 */
+ unsigned int JSS; /* 0x9C */
+ unsigned int CFC_RACC; /* 0xA0 */
+ unsigned int SSP1_RACC; /* 0xA4 */
+ unsigned int UART1TX_RACC; /* 0xA8 */
+ unsigned int UART1RX_RACC; /* 0xAC */
+ unsigned int UART2TX_RACC; /* 0xB0 */
+ unsigned int UART2RX_RACC; /* 0xB4 */
+ unsigned int SDC_RACC; /* 0xB8 */
+ unsigned int I2SAC97_RACC; /* 0xBC */
+ unsigned int IRDATX_RACC; /* 0xC0 */
+ unsigned int reserved4; /* 0xC4 */
+ unsigned int USBD_RACC; /* 0xC8 */
+ unsigned int IRDARX_RACC; /* 0xCC */
+ unsigned int IRDA_RACC; /* 0xD0 */
+ unsigned int ED0_RACC; /* 0xD4 */
+ unsigned int ED1_RACC; /* 0xD8 */
+};
+
+/*
+ * ID Number 0 Register
+ */
+#define FTPMU010_ID_A320A 0x03200000
+#define FTPMU010_ID_A320C 0x03200010
+#define FTPMU010_ID_A320D 0x03200030
+
+/*
+ * OSC Control Register
+ */
+#define FTPMU010_OSCC_OSCH_TRI (1 << 11)
+#define FTPMU010_OSCC_OSCH_STABLE (1 << 9)
+#define FTPMU010_OSCC_OSCH_OFF (1 << 8)
+
+#define FTPMU010_OSCC_OSCL_TRI (1 << 3)
+#define FTPMU010_OSCC_OSCL_RTCLSEL (1 << 2)
+#define FTPMU010_OSCC_OSCL_STABLE (1 << 1)
+#define FTPMU010_OSCC_OSCL_OFF (1 << 0)
+
+/*
+ * Power Mode Register
+ */
+#define FTPMU010_PMODE_DIVAHBCLK_MASK (0x7 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_2 (0x0 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_3 (0x1 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_4 (0x2 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_6 (0x3 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_8 (0x4 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK(pmode) (((pmode) >> 4) & 0x7)
+#define FTPMU010_PMODE_FCS (1 << 2)
+#define FTPMU010_PMODE_TURBO (1 << 1)
+#define FTPMU010_PMODE_SLEEP (1 << 0)
+
+/*
+ * Power Manager Status Register
+ */
+#define FTPMU010_PMSR_SMR (1 << 10)
+
+#define FTPMU010_PMSR_RDH (1 << 2)
+#define FTPMU010_PMSR_PH (1 << 1)
+#define FTPMU010_PMSR_CKEHLOW (1 << 0)
+
+/*
+ * Multi-Function Port Setting Register
+ */
+#define FTPMU010_MFPSR_MODEMPINSEL (1 << 14)
+#define FTPMU010_MFPSR_AC97CLKOUTSEL (1 << 13)
+#define FTPMU010_MFPSR_AC97PINSEL (1 << 3)
+
+/*
+ * PLL/DLL Control Register 0
+ */
+#define FTPMU010_PDLLCR0_HCLKOUTDIS(cr0) (((cr0) >> 20) & 0xf)
+#define FTPMU010_PDLLCR0_DLLFRAG (1 << 19)
+#define FTPMU010_PDLLCR0_DLLSTSEL (1 << 18)
+#define FTPMU010_PDLLCR0_DLLSTABLE (1 << 17)
+#define FTPMU010_PDLLCR0_DLLDIS (1 << 16)
+#define FTPMU010_PDLLCR0_PLL1NS(cr0) (((cr0) >> 3) & 0x1ff)
+#define FTPMU010_PDLLCR0_PLL1STSEL (1 << 2)
+#define FTPMU010_PDLLCR0_PLL1STABLE (1 << 1)
+#define FTPMU010_PDLLCR0_PLL1DIS (1 << 0)
+
+void ftpmu010_32768osc_enable(void);
+void ftpmu010_dlldis_disable(void);
+void ftpmu010_sdram_clk_disable(unsigned int cr0);
+
+#endif /* __FTPMU010_H */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
@ 2011-02-25 10:14 ` Macpaul Lin
2011-02-25 10:58 ` Macpaul Lin
2011-03-03 7:26 ` Albert ARIBAUD
2011-03-18 5:57 ` Macpaul Lin
2 siblings, 1 reply; 9+ messages in thread
From: Macpaul Lin @ 2011-02-25 10:14 UTC (permalink / raw)
To: u-boot
Hi Wolfgang and Albert,
2011/2/18 Po-Yu Chuang <ratbert.chuang@gmail.com>
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>
> Also add API declarations.
>
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> v2:
> move include/ftpmu010.h to include/faraday/ftpmu010.h
>
> drivers/power/ftpmu010.c | 2 +-
> drivers/power/ftpmu010.h | 146
> ------------------------------------------
> include/faraday/ftpmu010.h | 150 ++++++++++++++++++++++++++++++--
>
If the patch is reviewed and acceptable, would you please apply this patch
in order to move ftpmu010.h from driver folder to include/faraday folder?
Thus Po-Yu and I will commit the header definitions of those hardware
peripherals made by Faraday into "include/faraday" folder to avoid this kind
of "include ../../xxx.h" statement in other codes.
Thanks a lot.
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-02-25 10:14 ` Macpaul Lin
@ 2011-02-25 10:58 ` Macpaul Lin
0 siblings, 0 replies; 9+ messages in thread
From: Macpaul Lin @ 2011-02-25 10:58 UTC (permalink / raw)
To: u-boot
HI all,
2011/2/25 Macpaul Lin <macpaul@gmail.com>
>
> Hi Wolfgang and Albert,
>
> 2011/2/18 Po-Yu Chuang <ratbert.chuang@gmail.com>
>>
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> Also add API declarations.
>>
>> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
>> ---
>> v2:
>> move include/ftpmu010.h to include/faraday/ftpmu010.h
>>
>> ?drivers/power/ftpmu010.c ? | ? ?2 +-
>> ?drivers/power/ftpmu010.h ? | ?146 ------------------------------------------
>> ?include/faraday/ftpmu010.h | ?150 ++++++++++++++++++++++++++++++--
>
> If the patch is reviewed and acceptable, would you please apply this patch in order to move ftpmu010.h from driver folder to include/faraday folder?
> Thus Po-Yu and I will commit the header definitions of those hardware peripherals made by Faraday into "include/faraday" folder to avoid this kind of "include ../../xxx.h" statement in other codes.
Previous patch (/patch/83344/,
http://patchwork.ozlabs.org/patch/83344/) about ftpmu010.h include
path fix in a320 was set to "superseded" in patchwork to avoid
confusing when applying code.
Two better patches has been submit by Po-Yu as patch
http://patchwork.ozlabs.org/patch/83534/
and patch
http://patchwork.ozlabs.org/patch/83535/
--
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
2011-02-25 10:14 ` Macpaul Lin
@ 2011-03-03 7:26 ` Albert ARIBAUD
2011-03-18 5:57 ` Macpaul Lin
2 siblings, 0 replies; 9+ messages in thread
From: Albert ARIBAUD @ 2011-03-03 7:26 UTC (permalink / raw)
To: u-boot
Le 18/02/2011 06:34, Po-Yu Chuang a ?crit :
> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>
> Also add API declarations.
>
> Signed-off-by: Po-Yu Chuang<ratbert@faraday-tech.com>
> ---
Applied to u-boot-arm/next, thanks!
Wolfgang: I have put the patches in 'Awaiting upstream' state as none of
the states described in
<http://www.denx.de/wiki/view/U-Boot/Patches#Patchwork_work_flow> seemed
to fit "sitting in -next waiting to get into -master". If you'd prefer
another state, just let me know.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
2011-02-25 10:14 ` Macpaul Lin
2011-03-03 7:26 ` Albert ARIBAUD
@ 2011-03-18 5:57 ` Macpaul Lin
2011-03-18 6:15 ` Po-Yu Chuang
2 siblings, 1 reply; 9+ messages in thread
From: Macpaul Lin @ 2011-03-18 5:57 UTC (permalink / raw)
To: u-boot
Hi Po-Yu,
2011/2/18 Po-Yu Chuang <ratbert.chuang@gmail.com>
> move include/ftpmu010.h to include/faraday/ftpmu010.h
>
> ?drivers/power/ftpmu010.c ? | ? ?2 +-
> ?drivers/power/ftpmu010.h ? | ?146 ------------------------------------------
> ?include/faraday/ftpmu010.h | ?150 ++++++++++++++++++++++++++++++++++++++++++++
> ?3 files changed, 151 insertions(+), 147 deletions(-)
> ?delete mode 100644 drivers/power/ftpmu010.h
> ?create mode 100644 include/faraday/ftpmu010.h
Sorry I didn't notice that there are API declaration before in ftpmu010.h.
> +void ftpmu010_32768osc_enable(void);
> +void ftpmu010_dlldis_disable(void);
> +void ftpmu010_sdram_clk_disable(unsigned int cr0);
Po-Yu, does these three function declaration is a necessity in a320evb?
I'm using gcc 4.4 without these 3 function declaration seems okay.
Because I'm going to refine another enhancement patch for using
ftpmu010 in lowlevel_init.S.
Hence I need to use #ifndef __ASSEMBLY__ to protect these three APIs.
However, to compile adp-ag101 board (NDS32) doesn't require
these 3 functions to be declared here. I need your opinion to clarify this.
Thanks a lot.
--
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
2011-03-18 5:57 ` Macpaul Lin
@ 2011-03-18 6:15 ` Po-Yu Chuang
0 siblings, 0 replies; 9+ messages in thread
From: Po-Yu Chuang @ 2011-03-18 6:15 UTC (permalink / raw)
To: u-boot
Hi Macpaul,
On Fri, Mar 18, 2011 at 1:57 PM, Macpaul Lin <macpaul@gmail.com> wrote:
> 2011/2/18 Po-Yu Chuang <ratbert.chuang@gmail.com>
>> move include/ftpmu010.h to include/faraday/ftpmu010.h
>>
>> ?drivers/power/ftpmu010.c ? | ? ?2 +-
>> ?drivers/power/ftpmu010.h ? | ?146 ------------------------------------------
>> ?include/faraday/ftpmu010.h | ?150 ++++++++++++++++++++++++++++++++++++++++++++
>> ?3 files changed, 151 insertions(+), 147 deletions(-)
>> ?delete mode 100644 drivers/power/ftpmu010.h
>> ?create mode 100644 include/faraday/ftpmu010.h
>
> Sorry I didn't notice that there are API declaration before in ftpmu010.h.
>
>> +void ftpmu010_32768osc_enable(void);
This is used by a320evb.
>> +void ftpmu010_dlldis_disable(void);
>> +void ftpmu010_sdram_clk_disable(unsigned int cr0);
These are not.
> Po-Yu, does these three function declaration is a necessity in a320evb?
>
> I'm using gcc 4.4 without these 3 function declaration seems okay.
Either adp-ag101 does not use any of them or you put the declarations
somewhere in board-specific code which is wrong.
> Because I'm going to refine another enhancement patch for using
> ftpmu010 in lowlevel_init.S.
> Hence I need to use #ifndef __ASSEMBLY__ to protect these three APIs.
No problem here. Please use __ASSEMBLY__.
> However, to compile adp-ag101 board (NDS32) doesn't require
> these 3 functions to be declared here. I need your opinion to clarify this.
Does your board use ftpmu010_dlldis_disable() or
ftpmu010_sdram_clk_disable() ?
Best regards,
Po-Yu Chuang
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-18 6:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 9:10 [U-Boot] [PATCH 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/ Po-Yu Chuang
2011-02-16 9:23 ` Macpaul Lin
2011-02-16 9:36 ` Po-Yu Chuang
2011-02-18 5:34 ` [U-Boot] [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday Po-Yu Chuang
2011-02-25 10:14 ` Macpaul Lin
2011-02-25 10:58 ` Macpaul Lin
2011-03-03 7:26 ` Albert ARIBAUD
2011-03-18 5:57 ` Macpaul Lin
2011-03-18 6:15 ` Po-Yu Chuang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox