Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a7a89d96
Commit
a7a89d96
authored
Jan 20, 2009
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] pxa: add MFP support for pxa168
Signed-off-by:
Eric Miao
<
eric.miao@marvell.com
>
parent
e2bb6650
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
310 additions
and
0 deletions
+310
-0
arch/arm/mach-mmp/include/mach/mfp-pxa168.h
arch/arm/mach-mmp/include/mach/mfp-pxa168.h
+258
-0
arch/arm/mach-mmp/include/mach/mfp.h
arch/arm/mach-mmp/include/mach/mfp.h
+37
-0
arch/arm/mach-mmp/pxa168.c
arch/arm/mach-mmp/pxa168.c
+15
-0
No files found.
arch/arm/mach-mmp/include/mach/mfp-pxa168.h
0 → 100644
View file @
a7a89d96
This diff is collapsed.
Click to expand it.
arch/arm/mach-mmp/include/mach/mfp.h
0 → 100644
View file @
a7a89d96
#ifndef __ASM_MACH_MFP_H
#define __ASM_MACH_MFP_H
#include <plat/mfp.h>
/*
* NOTE: the MFPR register bit definitions on PXA168 processor lines are a
* bit different from those on PXA3xx. Bit [7:10] are now reserved, which
* were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
*
* To cope with this difference and re-use the pxa3xx mfp code as much as
* possible, we make the following compromise:
*
* 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
* 2. DRIVE strength definitions redefined to include the reserved bit10
* 3. Override MFP_CFG() and MFP_CFG_DRV()
* 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
*/
#define MFP_DRIVE_VERY_SLOW (0x0 << 13)
#define MFP_DRIVE_SLOW (0x2 << 13)
#define MFP_DRIVE_MEDIUM (0x4 << 13)
#define MFP_DRIVE_FAST (0x8 << 13)
#undef MFP_CFG
#undef MFP_CFG_DRV
#undef MFP_CFG_LPM
#undef MFP_CFG_X
#undef MFP_CFG_DEFAULT
#define MFP_CFG(pin, af) \
(MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
#define MFP_CFG_DRV(pin, af, drv) \
(MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
#endif
/* __ASM_MACH_MFP_H */
arch/arm/mach-mmp/pxa168.c
View file @
a7a89d96
...
@@ -23,10 +23,23 @@
...
@@ -23,10 +23,23 @@
#include <mach/gpio.h>
#include <mach/gpio.h>
#include <mach/dma.h>
#include <mach/dma.h>
#include <mach/devices.h>
#include <mach/devices.h>
#include <mach/mfp.h>
#include "common.h"
#include "common.h"
#include "clock.h"
#include "clock.h"
#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000)
static
struct
mfp_addr_map
pxa168_mfp_addr_map
[]
__initdata
=
{
MFP_ADDR_X
(
GPIO0
,
GPIO36
,
0x04c
),
MFP_ADDR_X
(
GPIO37
,
GPIO55
,
0x000
),
MFP_ADDR_X
(
GPIO56
,
GPIO123
,
0x0e0
),
MFP_ADDR_X
(
GPIO124
,
GPIO127
,
0x0f4
),
MFP_ADDR_END
,
};
#define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c)
#define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c)
static
void
__init
pxa168_init_gpio
(
void
)
static
void
__init
pxa168_init_gpio
(
void
)
...
@@ -62,6 +75,8 @@ static struct clk_lookup pxa168_clkregs[] = {
...
@@ -62,6 +75,8 @@ static struct clk_lookup pxa168_clkregs[] = {
static
int
__init
pxa168_init
(
void
)
static
int
__init
pxa168_init
(
void
)
{
{
if
(
cpu_is_pxa168
())
{
if
(
cpu_is_pxa168
())
{
mfp_init_base
(
MFPR_VIRT_BASE
);
mfp_init_addr
(
pxa168_mfp_addr_map
);
pxa_init_dma
(
IRQ_PXA168_DMA_INT0
,
32
);
pxa_init_dma
(
IRQ_PXA168_DMA_INT0
,
32
);
clks_register
(
ARRAY_AND_SIZE
(
pxa168_clkregs
));
clks_register
(
ARRAY_AND_SIZE
(
pxa168_clkregs
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment