Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14169
b: refs/heads/master
c: c55377e
h: refs/heads/master
i:
  14167: b7ca777
v: v3
  • Loading branch information
Paul Mackerras committed Nov 14, 2005
1 parent 2fd2de9 commit 13105c7
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 641 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 821077b2617ef70662a861393c929d7e47609512
refs/heads/master: c55377ee73f6efeb373ae06f6e918d87660b4852
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _PPC64_DELAY_H
#define _PPC64_DELAY_H
#ifndef _ASM_POWERPC_DELAY_H
#define _ASM_POWERPC_DELAY_H

/*
* Copyright 1996, Paul Mackerras.
Expand All @@ -15,10 +15,17 @@

extern unsigned long tb_ticks_per_usec;

/* define these here to prevent circular dependencies */
#ifdef CONFIG_PPC64
/* define these here to prevent circular dependencies */
/* these instructions control the thread priority on multi-threaded cpus */
#define __HMT_low() asm volatile("or 1,1,1")
#define __HMT_medium() asm volatile("or 2,2,2")
#define __barrier() asm volatile("":::"memory")
#else
#define __HMT_low()
#define __HMT_medium()
#endif

#define __barrier() asm volatile("" ::: "memory")

static inline unsigned long __get_tb(void)
{
Expand All @@ -32,7 +39,7 @@ static inline void __delay(unsigned long loops)
{
unsigned long start = __get_tb();

while((__get_tb()-start) < loops)
while((__get_tb() - start) < loops)
__HMT_low();
__HMT_medium();
__barrier();
Expand All @@ -45,4 +52,4 @@ static inline void udelay(unsigned long usecs)
__delay(loops);
}

#endif /* _PPC64_DELAY_H */
#endif /* _ASM_POWERPC_DELAY_H */
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
*
* Copyright (C) 1995
*/
#ifndef __ASM_PPC64_FLOPPY_H
#define __ASM_PPC64_FLOPPY_H
#ifndef __ASM_POWERPC_FLOPPY_H
#define __ASM_POWERPC_FLOPPY_H

#include <linux/config.h>
#include <asm/machdep.h>

#define fd_inb(port) inb_p(port)
#define fd_outb(value,port) outb_p(value,port)
#define fd_inb(port) inb_p(port)
#define fd_outb(value,port) outb_p(value,port)

#define fd_enable_dma() enable_dma(FLOPPY_DMA)
#define fd_disable_dma() disable_dma(FLOPPY_DMA)
#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy")
#define fd_request_dma() request_dma(FLOPPY_DMA, "floppy")
#define fd_free_dma() free_dma(FLOPPY_DMA)
#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA)
#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA,mode)
#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode)
#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count)
#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
#define fd_cacheflush(addr,size) /* nothing */
Expand All @@ -35,10 +35,10 @@

#include <linux/pci.h>

#define fd_dma_setup(addr,size,mode,io) ppc64_fd_dma_setup(addr,size,mode,io)
#define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io)

static __inline__ int
ppc64_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size,
int mode, int io)
{
static unsigned long prev_size;
static dma_addr_t bus_addr = 0;
Expand All @@ -55,9 +55,8 @@ ppc64_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
bus_addr = 0;
}

if (!bus_addr) /* need to map it */ {
if (!bus_addr) /* need to map it */
bus_addr = pci_map_single(NULL, addr, size, dir);
}

/* remember this one as prev */
prev_addr = addr;
Expand Down Expand Up @@ -103,4 +102,4 @@ static int FDC2 = -1;

#define EXTRA_FLOPPY_PARAMS

#endif /* __ASM_PPC64_FLOPPY_H */
#endif /* __ASM_POWERPC_FLOPPY_H */
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* PreP compliant NVRAM access
* This needs to be updated for PPC64
* NVRAM definitions and access functions.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

#ifndef _PPC64_NVRAM_H
#define _PPC64_NVRAM_H
#ifndef _ASM_POWERPC_NVRAM_H
#define _ASM_POWERPC_NVRAM_H

#define NVRW_CNT 0x20
#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
Expand Down Expand Up @@ -88,7 +87,11 @@ extern u8 pmac_xpram_read(int xpaddr);
extern void pmac_xpram_write(int xpaddr, u8 data);

/* Synchronize NVRAM */
extern int nvram_sync(void);
extern void nvram_sync(void);

/* Normal access to NVRAM */
extern unsigned char nvram_read_byte(int i);
extern void nvram_write_byte(unsigned char c, int i);

/* Some offsets in XPRAM */
#define PMAC_XPRAM_MACHINE_LOC 0xe4
Expand All @@ -112,5 +115,6 @@ struct pmac_machine_location {
_IOWR('p', 0x40, int)

#define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */
#define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */

#endif /* _PPC64_NVRAM_H */
#endif /* _ASM_POWERPC_NVRAM_H */
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/*
* include/asm-ppc64/serial.h
*/
#ifndef _PPC64_SERIAL_H
#define _PPC64_SERIAL_H

/*
* This assumes you have a 1.8432 MHz clock for your UART.
*
* It'd be nice if someone built a serial card with a 24.576 MHz
* clock, since the 16550A is capable of handling a top speed of 1.5
* megabits/second; but this requires the faster clock.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _ASM_POWERPC_SERIAL_H
#define _ASM_POWERPC_SERIAL_H

/*
* Serial ports are not listed here, because they are discovered
* through the device tree.
*/

/* Default baud base if not found in device-tree */
#define BASE_BAUD ( 1843200 / 16 )
Expand Down
73 changes: 0 additions & 73 deletions trunk/include/asm-ppc/nvram.h

This file was deleted.

Loading

0 comments on commit 13105c7

Please sign in to comment.