Change related to upstream merge.

* STAND_ALONE conditional compilation is removed.
* Previous interim commits are squashed.
* printk.h is included from atomport.h
* atom-types.h and atommport-types.h have been removed.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
This commit is contained in:
Himanshu Chauhan
2011-05-19 19:07:53 +05:30
parent 8bb70d8a90
commit f7dde300d4
41 changed files with 29 additions and 242 deletions

View File

@@ -102,8 +102,6 @@
#ifndef STAND_ALONE
#include <stdio.h>
#else
#include <atom-types.h>
#endif
#include "atom.h"

View File

@@ -92,8 +92,6 @@
#ifndef STAND_ALONE
#include <stdio.h>
#else
#include <atom-types.h>
#endif
#include <string.h>

View File

@@ -91,10 +91,6 @@
#include <stdio.h>
#endif
#ifdef STAND_ALONE
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomsem.h"
#include "atomtimer.h"

View File

@@ -68,8 +68,6 @@
#ifndef STAND_ALONE
#include <stdio.h>
#else
#include <atom-types.h>
#endif
#include "atom.h"

View File

@@ -30,14 +30,9 @@
*/
#include <system.h>
#include <atomport-types.h>
#include <stdarg.h>
#include <atomport.h>
#include <8250-serial.h>
//#define PORT1 (void *)0x140003f8
//#define PORT2 (void *)0x140002F8
//#define PORT3 (void *)0x140003E8
//#define PORT4 (void *)0x140002E8
#define PORT1 (void *)0xc00003f8
static inline unsigned int serial_in(int offset)
@@ -50,14 +45,12 @@ static inline void serial_out(int offset, int value)
iowriteb(PORT1 + offset, value);
}
int putch(uint8_t c)
void putch(uint8_t c)
{
while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
;
serial_out(UART_TX, c);
return 1;
}
void init_console()

View File

@@ -28,7 +28,7 @@
*/
#include <atomport-asm-macros.h>
#include <atomport-types.h>
#include <atomport.h>
#include <atom.h>
void mips_setup_interrupts()

View File

@@ -28,7 +28,7 @@
*/
#include <atomport-asm-macros.h>
#include <atomport-types.h>
#include <atomport.h>
#include <atom.h>
#include <atomport-timer.h>

View File

@@ -1,44 +0,0 @@
/*
* Copyright (c) 2011, Himanshu Chauhan. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. No personal names or organizations' names associated with the
* Atomthreads project may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE ATOMTHREADS PROJECT AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __ATOMPORT_TYPES_H
#define __ATOMPORT_TYPES_H
typedef signed int int32_t;
typedef signed short int16_t;
typedef signed char int8_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
typedef long long int64_t;
typedef unsigned long size_t;
#define UINT32 uint32_t
#endif /* __ATOMPORT_TYPES_H */

View File

@@ -30,9 +30,21 @@
#ifndef __ATOM_PORT_H
#define __ATOM_PORT_H
#include "atomport-types.h"
#include "atomport-timer.h"
typedef signed int int32_t;
typedef signed short int16_t;
typedef signed char int8_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
typedef long long int64_t;
typedef unsigned long size_t;
#define UINT32 uint32_t
#define NULL ((void *)(0))
/**
* Architecture-specific types.
* Most of these are available from stdint.h on this platform, which is
@@ -40,6 +52,8 @@
*/
#define POINTER void *
#include "printk.h"
/* Critical region protection */
#define CRITICAL_STORE unsigned int status_reg
#define CRITICAL_START() \

View File

@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <atomport-types.h>
#include <atomport.h>
uint8_t ioreadb (void *addr)
{

View File

@@ -29,14 +29,11 @@
*/
#include <system.h>
#include <atomport-types.h>
#include <atomport.h>
#include <stdarg.h>
static int8_t buf[2048];
extern void putch(uint8_t ch);
/* Uses the above routine to output a string... */
void puts(const uint8_t *text)
{

View File

@@ -33,10 +33,9 @@
#ifndef _PRINTK_H
#define _PRINTK_H
#include <atomport-types.h>
#include <stdarg.h>
#include "atomport.h"
extern void putch (uint8_t *ch);
extern void putch (uint8_t ch);
extern void puts (const uint8_t *text);
extern void printk (const char*format, ...);

View File

@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <atomport-types.h>
#include <atomport.h>
#include <system.h>
void *memcpy(void *dest, const void *src, size_t count)

View File

@@ -31,7 +31,7 @@
#ifndef __STRING_H
#define __STRING_H
#include <atomport-types.h>
#include <atomport.h>
void *memcpy(void *dest, const void *src, size_t count);
void *memset(void *dest, int8_t val, size_t count);

View File

@@ -31,7 +31,7 @@
#ifndef _SYSTEM_H
#define _SYSTEM_H
#include <atomport-types.h>
#include <atomport.h>
#include <stdarg.h>
extern const uint8_t *kernel_name;

View File

@@ -29,10 +29,10 @@
#include "atom.h"
#include "atomport-private.h"
#include "atomport.h"
#include "atomtests.h"
#include "atomtimer.h"
#include "system.h"
#include "printk.h"
#include "atomport-interrupts.h"
/* Constants */

View File

@@ -1,12 +1,12 @@
/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
/*
* Wirzenius wrote this portably, Torvalds fucked it up :-)
* and Himanshu Fucked it up further for Freax :))
* and Himanshu Fucked it up further :))
*/
#include <stdarg.h>
#include <system.h>
#include <atomport-types.h>
#include <atomport.h>
/* we use this so that we can do without the ctype library */
#define is_digit(c) ((c) >= '0' && (c) <= '9')

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atommutex.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atommutex.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atommutex.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atommutex.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomqueue.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomqueue.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomqueue.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"
#include "atomsem.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomsem.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtimer.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtimer.h"
#include "atomtests.h"

View File

@@ -27,7 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "atom.h"
#include "atomsem.h"
#include "atomtimer.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtimer.h"
#include "atomtests.h"

View File

@@ -27,13 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STAND_ALONE
#include <stddef.h>
#else
#include <printk.h>
#include <atom-types.h>
#endif
#include "atom.h"
#include "atomtests.h"