Rev 577 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 577 | Rev 586 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | #include <putchar.h> |
29 | #include <arch/console.h> |
30 | #include <genarch/ofw/ofw.h> |
30 | #include <genarch/ofw/ofw.h> |
31 | #include <console/chardev.h> |
31 | #include <console/chardev.h> |
32 | #include <console/console.h> |
32 | #include <console/console.h> |
33 | 33 | ||
34 | /** Print one character. |
34 | /** Print one character. |
35 | * |
35 | * |
36 | * @param ch Character to be printed. |
36 | * @param ch Character to be printed. |
37 | */ |
37 | */ |
38 | static void ofw_write(chardev_t *d, const char ch) |
38 | static void ofw_ppc32_putchar(chardev_t *d, const char ch) |
39 | { |
39 | { |
40 | ofw_putchar(ch); |
40 | ofw_putchar(ch); |
41 | } |
41 | } |
42 | 42 | ||
43 | chardev_t ofw_console; |
43 | static chardev_t ofw_ppc32_console; |
44 | static chardev_operations_t ofw_ops = { |
44 | static chardev_operations_t ofw_ppc32_console_ops = { |
45 | .write = ofw_write |
45 | .write = ofw_ppc32_putchar |
46 | }; |
46 | }; |
47 | 47 | ||
48 | /** Initialize console to use ofw output */ |
48 | /** Initialize console to use ofw output */ |
49 | void console_init(void) |
49 | void ofw_ppc32_console_init(void) |
50 | { |
50 | { |
51 | chardev_initialize("ofw_out", &ofw_console, &ofw_ops); |
51 | chardev_initialize("ofw_out", &ofw_ppc32_console, &ofw_ppc32_console_ops); |
52 | stdout = &ofw_console; |
52 | stdout = &ofw_ppc32_console; |
53 | } |
53 | } |