Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57395
b: refs/heads/master
c: 79894c7
h: refs/heads/master
i:
  57393: 52e68b8
  57391: a47894d
v: v3
  • Loading branch information
Ralf Baechle committed Jun 6, 2007
1 parent c3c7853 commit 3225ed0
Show file tree
Hide file tree
Showing 46 changed files with 285 additions and 830 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: 2c750edd39a45402e355459194fe8804366bedd2
refs/heads/master: 79894c7b47f78decaa3511f1d6646aa06e2c6bed
59 changes: 2 additions & 57 deletions trunk/Documentation/powerpc/booting-without-of.txt
Original file line number Diff line number Diff line change
@@ -1,69 +1,14 @@
Booting the Linux/ppc kernel without Open Firmware
--------------------------------------------------


(c) 2005 Benjamin Herrenschmidt <benh at kernel.crashing.org>,
IBM Corp.
(c) 2005 Becky Bruce <becky.bruce at freescale.com>,
Freescale Semiconductor, FSL SOC and 32-bit additions
(c) 2006 MontaVista Software, Inc.
Flash chip node definition

Table of Contents
=================

I - Introduction
1) Entry point for arch/powerpc
2) Board support

II - The DT block format
1) Header
2) Device tree generalities
3) Device tree "structure" block
4) Device tree "strings" block

III - Required content of the device tree
1) Note about cells and address representation
2) Note about "compatible" properties
3) Note about "name" properties
4) Note about node and property names and character set
5) Required nodes and properties
a) The root node
b) The /cpus node
c) The /cpus/* nodes
d) the /memory node(s)
e) The /chosen node
f) the /soc<SOCname> node

IV - "dtc", the device tree compiler

V - Recommendations for a bootloader

VI - System-on-a-chip devices and nodes
1) Defining child nodes of an SOC
2) Representing devices without a current OF specification
a) MDIO IO device
c) PHY nodes
b) Gianfar-compatible ethernet nodes
d) Interrupt controllers
e) I2C
f) Freescale SOC USB controllers
g) Freescale SOC SEC Security Engines
h) Board Control and Status (BCSR)
i) Freescale QUICC Engine module (QE)
g) Flash chip nodes

VII - Specifying interrupt information for devices
1) interrupts property
2) interrupt-parent property
3) OpenPIC Interrupt Controllers
4) ISA Interrupt Controllers

Appendix A - Sample SOC node for MPC8540


Revision Information
====================

May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.

May 19, 2005: Rev 0.2 - Add chapter III and bits & pieces here or
Expand Down Expand Up @@ -1742,7 +1687,7 @@ platforms are moved over to use the flattened-device-tree model.
};
};

j) Flash chip nodes
g) Flash chip nodes

Flash chips (Memory Technology Devices) are often used for solid state
file systems on embedded devices.
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/mips-boards/atlas/atlas_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const char *get_system_type(void)
return "MIPS Atlas";
}

const char display_string[] = " LINUX ON ATLAS ";

void __init plat_mem_setup(void)
{
mips_pcibios_init();
Expand Down
24 changes: 24 additions & 0 deletions trunk/arch/mips/mips-boards/generic/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
*/

#include <linux/compiler.h>
#include <linux/timer.h>
#include <asm/io.h>
#include <asm/mips-boards/generic.h>

extern const char display_string[];
static unsigned int display_count;
static unsigned int max_display_count;

void mips_display_message(const char *str)
{
static unsigned int __iomem *display = NULL;
Expand All @@ -37,3 +42,22 @@ void mips_display_message(const char *str)
writel(' ', display + i);
}
}

static void scroll_display_message(unsigned long data);
static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0);

static void scroll_display_message(unsigned long data)
{
mips_display_message(&display_string[display_count++]);
if (display_count == max_display_count)
display_count = 0;

mod_timer(&mips_scroll_timer, jiffies + HZ);
}

void mips_scroll_message(void)
{
del_timer_sync(&mips_scroll_timer);
max_display_count = strlen(display_string) + 1 - 8;
mod_timer(&mips_scroll_timer, jiffies + 1);
}
31 changes: 2 additions & 29 deletions trunk/arch/mips/mips-boards/generic/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,11 @@

unsigned long cpu_khz;

#if defined(CONFIG_MIPS_ATLAS)
static char display_string[] = " LINUX ON ATLAS ";
#endif
#if defined(CONFIG_MIPS_MALTA)
#if defined(CONFIG_MIPS_MT_SMTC)
static char display_string[] = " SMTC LINUX ON MALTA ";
#else
static char display_string[] = " LINUX ON MALTA ";
#endif /* CONFIG_MIPS_MT_SMTC */
#endif
#if defined(CONFIG_MIPS_SEAD)
static char display_string[] = " LINUX ON SEAD ";
#endif
static unsigned int display_count;
#define MAX_DISPLAY_COUNT (sizeof(display_string) - 8)

#define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR)

static unsigned int timer_tick_count;
static int mips_cpu_timer_irq;
extern void smtc_timer_broadcast(int);

static inline void scroll_display_message(void)
{
if ((timer_tick_count++ % HZ) == 0) {
mips_display_message(&display_string[display_count++]);
if (display_count == MAX_DISPLAY_COUNT)
display_count = 0;
}
}

static void mips_timer_dispatch(void)
{
do_IRQ(mips_cpu_timer_irq);
Expand Down Expand Up @@ -143,7 +117,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
if (cpu_data[cpu].vpe_id == 0) {
timer_interrupt(irq, NULL);
smtc_timer_broadcast(cpu_data[cpu].vpe_id);
scroll_display_message();
} else {
write_c0_compare(read_c0_count() +
(mips_hpt_frequency/HZ));
Expand All @@ -167,8 +140,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
/* we keep interrupt disabled all the time */
if (!r2 || (read_c0_cause() & (1 << 30)))
timer_interrupt(irq, NULL);

scroll_display_message();
} else {
/* Everyone else needs to reset the timer int here as
ll_local_timer_interrupt doesn't */
Expand Down Expand Up @@ -262,6 +233,8 @@ void __init mips_time_init(void)
(est_freq%1000000)*100/1000000);

cpu_khz = est_freq / 1000;

mips_scroll_message();
}

void __init plat_timer_setup(struct irqaction *irq)
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/mips/mips-boards/malta/malta_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ const char *get_system_type(void)
return "MIPS Malta";
}

#if defined(CONFIG_MIPS_MT_SMTC)
const char display_string[] = " SMTC LINUX ON MALTA ";
#else
const char display_string[] = " LINUX ON MALTA ";
#endif /* CONFIG_MIPS_MT_SMTC */

#ifdef CONFIG_BLK_DEV_FD
void __init fd_activate(void)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/mips-boards/sead/sead_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const char *get_system_type(void)
return "MIPS SEAD";
}

const char display_string[] = " LINUX ON SEAD ";

void __init plat_mem_setup(void)
{
ioport_resource.end = 0x7fffffff;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/boot/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

.text
/* a procedure descriptor used when booting this as a COFF file */
.globl _zimage_start_opd
_zimage_start_opd:
.long _zimage_start, 0, 0, 0

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
* Note also that we don't do ISA, this will also be fixed with a
* more massive rework.
*/
pci_setup_phb_io(phb, pci_io_base == 0);
pci_setup_phb_io(phb, 0);

/* Init pci_dn data structures */
pci_devs_phb_init_dynamic(phb);
Expand Down
33 changes: 6 additions & 27 deletions trunk/arch/powerpc/platforms/cell/cbe_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static u64 MIC_Slow_Next_Timer_table[] = {
0x00003FC000000000ull,
};

static unsigned int pmi_frequency_limit = 0;
/*
* hardware specific functions
*/
Expand Down Expand Up @@ -165,6 +164,7 @@ static int set_pmode(int cpu, unsigned int slow_mode) {

static void cbe_cpufreq_handle_pmi(struct of_device *dev, pmi_message_t pmi_msg)
{
struct cpufreq_policy policy;
u8 cpu;
u8 cbe_pmode_new;

Expand All @@ -173,27 +173,15 @@ static void cbe_cpufreq_handle_pmi(struct of_device *dev, pmi_message_t pmi_msg)
cpu = cbe_node_to_cpu(pmi_msg.data1);
cbe_pmode_new = pmi_msg.data2;

pmi_frequency_limit = cbe_freqs[cbe_pmode_new].frequency;
cpufreq_get_policy(&policy, cpu);

pr_debug("cbe_handle_pmi: max freq=%d\n", pmi_frequency_limit);
}

static int pmi_notifier(struct notifier_block *nb,
unsigned long event, void *data)
{
struct cpufreq_policy *policy = data;
policy.max = min(policy.max, cbe_freqs[cbe_pmode_new].frequency);
policy.min = min(policy.min, policy.max);

if (event != CPUFREQ_INCOMPATIBLE)
return 0;

cpufreq_verify_within_limits(policy, 0, pmi_frequency_limit);
return 0;
pr_debug("cbe_handle_pmi: new policy.min=%d policy.max=%d\n", policy.min, policy.max);
cpufreq_set_policy(&policy);
}

static struct notifier_block pmi_notifier_block = {
.notifier_call = pmi_notifier,
};

static struct pmi_handler cbe_pmi_handler = {
.type = PMI_TYPE_FREQ_CHANGE,
.handle_pmi_message = cbe_cpufreq_handle_pmi,
Expand Down Expand Up @@ -250,21 +238,12 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)

cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu);

if (pmi_dev) {
/* frequency might get limited later, initialize limit with max_freq */
pmi_frequency_limit = max_freq;
cpufreq_register_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
}

/* this ensures that policy->cpuinfo_min and policy->cpuinfo_max are set correctly */
return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs);
}

static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)
{
if (pmi_dev)
cpufreq_unregister_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);

cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/platforms/cell/spufs/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
if (spu_init_csa(&ctx->csa))
goto out_free;
spin_lock_init(&ctx->mmio_lock);
mutex_init(&ctx->mapping_lock);
spin_lock_init(&ctx->mapping_lock);
kref_init(&ctx->kref);
mutex_init(&ctx->state_mutex);
mutex_init(&ctx->run_mutex);
Expand Down Expand Up @@ -103,7 +103,6 @@ void spu_forget(struct spu_context *ctx)

void spu_unmap_mappings(struct spu_context *ctx)
{
mutex_lock(&ctx->mapping_lock);
if (ctx->local_store)
unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
if (ctx->mfc)
Expand All @@ -118,7 +117,6 @@ void spu_unmap_mappings(struct spu_context *ctx)
unmap_mapping_range(ctx->mss, 0, 0x1000, 1);
if (ctx->psmap)
unmap_mapping_range(ctx->psmap, 0, 0x20000, 1);
mutex_unlock(&ctx->mapping_lock);
}

/**
Expand Down
Loading

0 comments on commit 3225ed0

Please sign in to comment.