Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d30c74a0
Commit
d30c74a0
authored
Jun 04, 2009
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MXC uncompress macros: determine uart base by machine type
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
abae6130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
18 deletions
+42
-18
arch/arm/plat-mxc/include/mach/uncompress.h
arch/arm/plat-mxc/include/mach/uncompress.h
+42
-18
No files found.
arch/arm/plat-mxc/include/mach/uncompress.h
View file @
d30c74a0
...
...
@@ -26,8 +26,11 @@
#define __MXC_BOOT_UNCOMPRESS
#include <mach/hardware.h>
#include <asm/mach-types.h>
#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
static
unsigned
long
uart_base
;
#define UART(x) (*(volatile unsigned long *)(uart_base + (x)))
#define USR2 0x98
#define USR2_TXFE (1<<14)
...
...
@@ -46,19 +49,10 @@
static
void
putc
(
int
ch
)
{
static
unsigned
long
serial_port
=
0
;
if
(
unlikely
(
serial_port
==
0
))
{
do
{
serial_port
=
UART1_BASE_ADDR
;
if
(
UART
(
UCR1
)
&
UCR1_UARTEN
)
break
;
serial_port
=
UART2_BASE_ADDR
;
if
(
UART
(
UCR1
)
&
UCR1_UARTEN
)
break
;
return
;
}
while
(
0
);
}
if
(
!
uart_base
)
return
;
if
(
!
(
UART
(
UCR1
)
&
UCR1_UARTEN
))
return
;
while
(
!
(
UART
(
USR2
)
&
USR2_TXFE
))
barrier
();
...
...
@@ -68,11 +62,41 @@ static void putc(int ch)
#define flush() do { } while (0)
/*
* nothing to do
*/
#define arch_decomp_setup()
#define MX1_UART1_BASE_ADDR 0x00206000
#define MX2X_UART1_BASE_ADDR 0x1000a000
#define MX3X_UART1_BASE_ADDR 0x43F90000
static
__inline__
void
__arch_decomp_setup
(
unsigned
long
arch_id
)
{
switch
(
arch_id
)
{
case
MACH_TYPE_MX1ADS
:
case
MACH_TYPE_SCB9328
:
uart_base
=
MX1_UART1_BASE_ADDR
;
break
;
case
MACH_TYPE_IMX27LITE
:
case
MACH_TYPE_MX27_3DS
:
case
MACH_TYPE_MX27ADS
:
case
MACH_TYPE_PCM038
:
case
MACH_TYPE_MX21ADS
:
uart_base
=
MX2X_UART1_BASE_ADDR
;
break
;
case
MACH_TYPE_MX31LITE
:
case
MACH_TYPE_ARMADILLO5X0
:
case
MACH_TYPE_MX31MOBOARD
:
case
MACH_TYPE_QONG
:
case
MACH_TYPE_MX31_3DS
:
case
MACH_TYPE_PCM037
:
case
MACH_TYPE_MX31ADS
:
case
MACH_TYPE_MX35_3DS
:
case
MACH_TYPE_PCM043
:
uart_base
=
MX3X_UART1_BASE_ADDR
;
break
;
default:
break
;
}
}
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#define arch_decomp_wdog()
#endif
/* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
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