Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MMC U-Boot Custodian Tree
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
U-Boot
Custodians
MMC U-Boot Custodian Tree
Commits
f55d4978
Commit
f55d4978
authored
3 years ago
by
This contributor prefers not to receive mails
Committed by
Tom Rini
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Nokia RX-51: Convert to CONFIG_DM_KEYBOARD
Signed-off-by:
Pali Rohár
<
pali@kernel.org
>
parent
5980925e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
board/nokia/rx51/rx51.c
+32
-5
32 additions, 5 deletions
board/nokia/rx51/rx51.c
configs/nokia_rx51_defconfig
+1
-1
1 addition, 1 deletion
configs/nokia_rx51_defconfig
include/configs/nokia_rx51.h
+1
-12
1 addition, 12 deletions
include/configs/nokia_rx51.h
with
34 additions
and
18 deletions
board/nokia/rx51/rx51.c
+
32
−
5
View file @
f55d4978
...
...
@@ -31,6 +31,7 @@
#include
<twl4030.h>
#include
<i2c.h>
#include
<video_fb.h>
#include
<keyboard.h>
#include
<asm/global_data.h>
#include
<asm/io.h>
#include
<asm/setup.h>
...
...
@@ -579,10 +580,10 @@ static u8 keybuf_head;
static
u8
keybuf_tail
;
/*
* Routine: rx51_kp_
ini
t
* Routine: rx51_kp_
star
t
* Description: Initialize HW keyboard.
*/
int
rx51_kp_
init
(
void
)
static
int
rx51_kp_
start
(
struct
udevice
*
dev
)
{
int
ret
=
0
;
u8
ctrl
;
...
...
@@ -656,7 +657,7 @@ static void rx51_kp_fill(u8 k, u8 mods)
* Routine: rx51_kp_tstc
* Description: Test if key was pressed (from buffer).
*/
int
rx51_kp_tstc
(
struct
stdio_dev
*
s
dev
)
static
int
rx51_kp_tstc
(
struct
udevice
*
dev
)
{
u8
c
,
r
,
dk
,
i
;
u8
intr
;
...
...
@@ -712,14 +713,36 @@ int rx51_kp_tstc(struct stdio_dev *sdev)
* Routine: rx51_kp_getc
* Description: Get last pressed key (from buffer).
*/
int
rx51_kp_getc
(
struct
stdio_dev
*
s
dev
)
static
int
rx51_kp_getc
(
struct
udevice
*
dev
)
{
keybuf_head
%=
KEYBUF_SIZE
;
while
(
!
rx51_kp_tstc
(
s
dev
))
while
(
!
rx51_kp_tstc
(
dev
))
WATCHDOG_RESET
();
return
keybuf
[
keybuf_head
++
];
}
static
int
rx51_kp_probe
(
struct
udevice
*
dev
)
{
struct
keyboard_priv
*
uc_priv
=
dev_get_uclass_priv
(
dev
);
struct
stdio_dev
*
sdev
=
&
uc_priv
->
sdev
;
strcpy
(
sdev
->
name
,
"keyboard"
);
return
input_stdio_register
(
sdev
);
}
static
const
struct
keyboard_ops
rx51_kp_ops
=
{
.
start
=
rx51_kp_start
,
.
tstc
=
rx51_kp_tstc
,
.
getc
=
rx51_kp_getc
,
};
U_BOOT_DRIVER
(
rx51_kp
)
=
{
.
name
=
"rx51_kp"
,
.
id
=
UCLASS_KEYBOARD
,
.
probe
=
rx51_kp_probe
,
.
ops
=
&
rx51_kp_ops
,
};
static
const
struct
mmc_config
rx51_mmc_cfg
=
{
.
host_caps
=
MMC_MODE_4BIT
|
MMC_MODE_HS_52MHz
|
MMC_MODE_HS
,
.
f_min
=
400000
,
...
...
@@ -753,3 +776,7 @@ U_BOOT_DRVINFOS(rx51_i2c) = {
U_BOOT_DRVINFOS
(
rx51_watchdog
)
=
{
{
"rx51_watchdog"
},
};
U_BOOT_DRVINFOS
(
rx51_kp
)
=
{
{
"rx51_kp"
},
};
This diff is collapsed.
Click to expand it.
configs/nokia_rx51_defconfig
+
1
−
1
View file @
f55d4978
...
...
@@ -66,6 +66,7 @@ CONFIG_DM=y
# CONFIG_DM_SEQ_ALIAS is not set
# CONFIG_BLOCK_CACHE is not set
CONFIG_DM_I2C=y
CONFIG_DM_KEYBOARD=y
# CONFIG_MMC_HW_PARTITIONING is not set
# CONFIG_MMC_VERBOSE is not set
CONFIG_MMC_OMAP_HS=y
...
...
@@ -78,7 +79,6 @@ CONFIG_USB_MUSB_UDC=y
CONFIG_USB_OMAP3=y
CONFIG_CFB_CONSOLE=y
CONFIG_CFB_CONSOLE_ANSI=y
# CONFIG_VGA_AS_SINGLE_DEVICE is not set
CONFIG_SPLASH_SCREEN=y
CONFIG_WATCHDOG_TIMEOUT_MSECS=31000
CONFIG_WDT=y
...
...
This diff is collapsed.
Click to expand it.
include/configs/nokia_rx51.h
+
1
−
12
View file @
f55d4978
...
...
@@ -77,21 +77,10 @@
#define VIDEO_FB_16BPP_PIXEL_SWAP
#define VIDEO_FB_16BPP_WORD_SWAP
/* functions for cfb_console */
#define VIDEO_KBD_INIT_FCT rx51_kp_init()
#define VIDEO_TSTC_FCT rx51_kp_tstc
#define VIDEO_GETC_FCT rx51_kp_getc
#ifndef __ASSEMBLY__
struct
stdio_dev
;
int
rx51_kp_init
(
void
);
int
rx51_kp_tstc
(
struct
stdio_dev
*
sdev
);
int
rx51_kp_getc
(
struct
stdio_dev
*
sdev
);
#endif
/* Environment information */
#define CONFIG_EXTRA_ENV_SETTINGS \
"usbtty=cdc_acm\0" \
"stdin=usbtty,serial,
vga
\0" \
"stdin=usbtty,serial,
keyboard
\0" \
"stdout=usbtty,serial,vga\0" \
"stderr=usbtty,serial,vga\0" \
"slide=gpio input " __stringify(GPIO_SLIDE) "\0" \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment