extern struct serial_device serial_scc_device;
extern struct serial_device *default_serial_console(void);
-#if defined(CONFIG_405GP) || \
- defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
- defined(CONFIG_405EX) || defined(CONFIG_440) || \
- defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
- defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
- defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
+#if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
+ defined(CONFIG_MPC86xx) || \
defined(CONFIG_TEGRA) || defined(CONFIG_SYS_COREBOOT) || \
defined(CONFIG_MICROBLAZE)
extern struct serial_device serial0_device;
extern struct serial_device eserial1_device;
extern struct serial_device eserial2_device;
+extern struct serial_device eserial3_device;
+extern struct serial_device eserial4_device;
+extern struct serial_device eserial5_device;
+extern struct serial_device eserial6_device;
extern void serial_register(struct serial_device *);
extern void serial_initialize(void);
#endif /* CONFIG_USB_TTY */
-#if defined(CONFIG_MPC512X)
-extern struct stdio_dev *open_port(int num, int baudrate);
-extern int close_port(int num);
-extern int write_port(struct stdio_dev *port, char *buf);
-extern int read_port(struct stdio_dev *port, char *buf, int size);
-#endif
-
struct udevice;
+enum serial_par {
+ SERIAL_PAR_NONE,
+ SERIAL_PAR_ODD,
+ SERIAL_PAR_EVEN
+};
+
/**
* struct struct dm_serial_ops - Driver model serial operations
*
*/
int (*loop)(struct udevice *dev, int on);
#endif
+ /**
+ * setparity() - Set up the parity
+ *
+ * Set up a new parity for this device.
+ *
+ * @dev: Device pointer
+ * @parity: parity to use
+ * @return 0 if OK, -ve on error
+ */
+ int (*setparity)(struct udevice *dev, enum serial_par parity);
};
/**
* struct serial_dev_priv - information about a device used by the uclass
*
- * @sdev: stdio device attached to this uart
+ * @sdev: stdio device attached to this uart
+ *
+ * @buf: Pointer to the RX buffer
+ * @rd_ptr: Read pointer in the RX buffer
+ * @wr_ptr: Write pointer in the RX buffer
*/
struct serial_dev_priv {
struct stdio_dev *sdev;
+
+ char *buf;
+ int rd_ptr;
+ int wr_ptr;
};
/* Access the serial operations for a device */
#define serial_get_ops(dev) ((struct dm_serial_ops *)(dev)->driver->ops)
+void atmel_serial_initialize(void);
+void au1x00_serial_initialize(void);
+void mcf_serial_initialize(void);
+void mpc85xx_serial_initialize(void);
+void mpc8xx_serial_initialize(void);
+void mxc_serial_initialize(void);
+void ns16550_serial_initialize(void);
+void pl01x_serial_initialize(void);
+void pxa_serial_initialize(void);
+void sh_serial_initialize(void);
+
#endif