mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 05:42:36 +00:00
serial: sh-sci: Move SCBRR calculation algo in to platform data.
This permits each port to select its own SCBRR calculation algorithm, rather than having it all ifdef'ed in the header. There are presently only 5 different variations that all parts fall under. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
00b9de9c24
commit
26c92f3728
27 changed files with 122 additions and 58 deletions
|
@ -7,6 +7,14 @@
|
|||
* Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
|
||||
*/
|
||||
|
||||
enum {
|
||||
SCBRR_ALGO_1, /* ((clk + 16 * bps) / (16 * bps) - 1) */
|
||||
SCBRR_ALGO_2, /* ((clk + 16 * bps) / (32 * bps) - 1) */
|
||||
SCBRR_ALGO_3, /* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */
|
||||
SCBRR_ALGO_4, /* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */
|
||||
SCBRR_ALGO_5, /* (((clk * 1000 / 32) / bps) - 1) */
|
||||
};
|
||||
|
||||
#define SCSCR_TIE (1 << 7)
|
||||
#define SCSCR_RIE (1 << 6)
|
||||
#define SCSCR_TE (1 << 5)
|
||||
|
@ -36,6 +44,7 @@ struct plat_sci_port {
|
|||
upf_t flags; /* UPF_* flags */
|
||||
char *clk; /* clock string */
|
||||
|
||||
unsigned int scbrr_algo_id; /* SCBRR calculation algo */
|
||||
unsigned int scscr; /* SCSCR initialization */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue