9
0
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Jean-Christophe PLAGNIOL-VILLARD 770e1a4d63 serial: do not set default baudrate at init
this will be done at activation

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 16:46:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD e62d425517 console: drop f_caps and check the function pointer getc/putc instead
None of the driver make the difference between STDOUT and STDERR.
So we just need to check if putc or getc are filled in the console_device

save 32 bytes on versatilepb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-21 09:59:16 +02:00
Alexander Shiyan 54cbf39fca Introduce console_platform_driver() macro and use it for serial drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Sascha Hauer 159109f5ff serial i.MX: Make locally used variables static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 21:01:10 +01:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 3e1f8a05b9 serial i.MX: Use devtype data to determine uart version
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:32:06 +02:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer d4edd480b2 ARM i.MX: Remove old clock support
The old clock support is now unused. Remove it. The former i.MX clko
command is superseeded by generic clock manipulation commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:57 +02:00
Sascha Hauer e3bc3f751d serial i.MX: Switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 2fef30b560 serial i.MX: oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 18:14:40 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer e0c18c0866 serial i.MX: i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 0f7b86f1cb serial imx: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 4b8750c956 uart drivers: use xzalloc instead of xmalloc
The flags in struct console_device have to be initialized
to zero. Otherwise the following can happen:

- console_register sets the initial baudrate of a new console
  before we set the global console init state to CONSOLE_INIT_FULL.
- In console_baudrate_set we test whether the current console is
  active which may be true because of unitialized flags.
- we then call getc() to wait for the user to accept the new settings
  and we are stuck because of the CONSOLE_UNINITIALIZED state
  we will never get anything from getc().

Looking back this explains some cases for me when barebox refused
to start and I really wonder why this did not become a more visible
problem before.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-23 11:15:44 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Marc Kleine-Budde 9eaaf1b1ca ARM: add support for the i.MX53
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:10:38 +02:00
Sascha Hauer f820d7e097 serial i.MX: convert to struct resource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-19 00:12:50 +08:00
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Sascha Hauer ca5bfba40e i.MX serial: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:24 +02:00
Sascha Hauer 082e56d6f2 imx_serial: Add mx51 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:14 +02:00
Sascha Hauer 1996f64c4d i.MX serial: Use readl/writel instead of pointer deref
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-24 11:36:46 +02:00
Jean-Christophe PLAGNIOL-VILLARD f6a579da9c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:25 +02:00
Sascha Hauer d8863de370 imx serial: add mx25 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-08 12:42:55 +02:00
Sascha Hauer ae302919c6 Get rid of DEVICE_TYPE_CONSOLE usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
Sascha Hauer 252f3bac8c imx serial driver: add input frequency change support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-18 12:15:47 +02:00
Ivo Clarysse fcfbd10d3c Add Freescale i.MX21 support
Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-07 08:55:04 +02:00
Sascha Hauer 331819b180 i.MX serial driver: remove duplicated defines
Also, the i.MX1 is the only one different, so change the #ifdef
accordingly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-31 11:17:57 +02:00
Sascha Hauer 3fdcf5b6c8 imx serial driver: add flush support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 12:21:29 +01:00
Sascha Hauer 7d304edb7a i.MX serial: Add mx35 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-06 14:44:46 +01:00
Sascha Hauer 1a3c1d3de1 i.MX: introduce imx_get_uartclk function
We need this function for MX35 support since the uart clock is not
equal to perclk1 anymore. Uh, it's really time to implement some
real clock API instead of this cruft.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-01-13 14:30:56 +01:00
Juergen Beisert e1c9102d3b make it work with all current CPUs 2007-10-18 00:00:02 +02:00
Juergen Beisert 3be8ed2fa1 adding i.MX31 CPU support 2007-10-17 17:57:55 +02:00
Sascha Hauer 3cbd38c922 serial_imx.c: now works on i.MX27 2007-10-09 17:18:08 +02:00
Sascha Hauer ca99316c68 re-enable uart initialization 2007-10-08 00:52:44 +02:00
Sascha Hauer 30433b4db9 move gpio setup functions to board code 2007-07-05 21:44:39 +02:00
Sascha Hauer 84e84863d8 svn_rev_510 2007-07-05 18:02:00 +02:00
Sascha Hauer de9740e6a6 svn_rev_484
moved
2007-07-05 18:01:58 +02:00