Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
b3bd0731
Commit
b3bd0731
authored
Sep 23, 2018
by
Jorge Ramirez-Ortiz
Committed by
ldts
Oct 17, 2018
Browse files
rcar_gen3: drivers: spi multio bus controller
Signed-off-by:
ldts
<
jramirez@baylibre.com
>
parent
0709efbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
drivers/renesas/rcar/rpc/rpc_driver.c
0 → 100644
View file @
b3bd0731
/*
* Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <mmio.h>
#include <stdint.h>
#include <string.h>
#include "cpg_registers.h"
#include "rpc_registers.h"
#include "debug.h"
#include "rcar_private.h"
#define MSTPSR9_RPC_BIT (0x00020000U)
#define RPC_CMNCR_MD_BIT (0x80000000U)
static
void
rpc_enable
(
void
)
{
/* Enable clock supply to RPC. */
mstpcr_write
(
CPG_SMSTPCR9
,
CPG_MSTPSR9
,
MSTPSR9_RPC_BIT
);
}
static
void
rpc_setup
(
void
)
{
if
(
mmio_read_32
(
RPC_CMNCR
)
&
RPC_CMNCR_MD_BIT
)
mmio_clrbits_32
(
RPC_CMNCR
,
RPC_CMNCR_MD_BIT
);
}
void
rcar_rpc_init
(
void
)
{
rpc_enable
();
rpc_setup
();
}
drivers/renesas/rcar/rpc/rpc_registers.h
0 → 100644
View file @
b3bd0731
/*
* Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RPC_REGISTER_H__
#define RPC_REGISTER_H__
#define RPC_BASE (0xEE200000U)
#define RPC_CMNCR (RPC_BASE + 0x0000U)
#define RPC_SSLDR (RPC_BASE + 0x0004U)
#define RPC_DRCR (RPC_BASE + 0x000CU)
#define RPC_DRCMR (RPC_BASE + 0x0010U)
#define RPC_DRENR (RPC_BASE + 0x001CU)
#define RPC_SMCR (RPC_BASE + 0x0020U)
#define RPC_SMCMR (RPC_BASE + 0x0024U)
#define RPC_SMENR (RPC_BASE + 0x0030U)
#define RPC_CMNSR (RPC_BASE + 0x0048U)
#define RPC_DRDMCR (RPC_BASE + 0x0058U)
#define RPC_DRDRENR (RPC_BASE + 0x005CU)
#define RPC_PHYCNT (RPC_BASE + 0x007CU)
#define RPC_PHYINT (RPC_BASE + 0x0088U)
#endif
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