public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Johannes Berg <johannes@sipsolutions•net>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: PowerMac7,3 sound (was: PowerBook5,4 -- no sound?)
Date: Thu, 18 May 2006 13:13:42 +1000	[thread overview]
Message-ID: <1147922022.17679.10.camel@localhost.localdomain> (raw)
In-Reply-To: <1147862072.14395.25.camel@johannes>

On Wed, 2006-05-17 at 12:34 +0200, Johannes Berg wrote:
> > > request_mem_region(80000000 - 80000fff, i2sbus control)
> > > 
> > >       80000000-8007ffff : 0.80000000:mac-io
> > >         8000002c-8000002f : 0.0000004c:fans
> > >         80000030-80000033 : 0.0000004c:fans
> > >         80000034-80000037 : 0.0000004c:fans
> > >         8000004c-8000004f : 0.0000004c:fans
> > >         80000050-8000008a : 0.00000050:gpio
> 
> > Look like the bugs in the device-tree I told you about ...
> 
> Ben, is it safe to just hardcode 0x80010000-0x80010fff? Or hardcode
> 0x10000-0x10fff and have it do the translation depending on the
> device-tree node, iow assume that the 'reg' property is bogus and
> essentially replace it with one that contains the values
>   0x00010000 0x00001000 (buggy one seems to be 0x00000000 0x00001000)
>   0x00008000 0x00000100
>   0x00008100 0x00000100
> and then go from there? Even then though, I have no idea how to do the
> ranges translation for the node. Maybe we should just fix up the reg
> property in the device-tree for the affected machine(s)?

I'd rather avoid hard-coding in fact. I'm trying to figure out a better
way.

> Btw, it doesn't look like snd-powermac handles this correctly, it only
> ever handles the rx/tx specially and also takes the control io area
> straight from the device tree.
> 
> Andreas, you'll probably be able to get a bit further by inserting the
> following code in front of the loop in i2sbus-core.c line 162, and
> removing the of_address_to_resource call inside the loop.
> 
>   dev->resources[0].start = 0x80010000;
>   dev->resources[0].end   = 0x80010fff;
>   dev->resources[1].start = 0x80008000;
>   dev->resources[1].end   = 0x800080ff;
>   dev->resources[2].start = 0x80008100;
>   dev->resources[2].end   = 0x800081ff;
> 
> But I'm not sure that is correct on all machines (in fact, I'm not
> perfectly sure it is correct on your machine).
> 
> After that, you'll probably still not have usable sound though because I
> know nothing about the layout-id of your machine. If I have support for
> your codec already, that should be easy though.
> 
> johannes

  parent reply	other threads:[~2006-05-18  3:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-16 14:39 PowerBook5,4 -- no sound? Paul Collins
2006-04-16 15:49 ` Andreas Schwab
2006-04-16 20:43   ` Benjamin Herrenschmidt
2006-04-16 23:33     ` Andreas Schwab
2006-04-16 23:54       ` Benjamin Herrenschmidt
2006-04-17  0:27         ` Andreas Schwab
2006-04-17  0:30           ` Benjamin Herrenschmidt
2006-04-17 13:45             ` Andreas Schwab
2006-04-17 20:51               ` Benjamin Herrenschmidt
2006-04-17 20:57                 ` Johannes Berg
2006-04-17 21:33                 ` Andreas Schwab
2006-04-17 21:50                   ` Benjamin Herrenschmidt
2006-05-17 10:34                 ` PowerMac7,3 sound (was: PowerBook5,4 -- no sound?) Johannes Berg
2006-05-17 19:32                   ` Andreas Schwab
2006-05-17 20:14                     ` Andreas Schwab
2006-05-18 10:39                     ` Johannes Berg
2006-05-18 12:48                       ` Andreas Schwab
2006-05-18 21:49                         ` Benjamin Herrenschmidt
2006-05-19 12:47                         ` Johannes Berg
2006-05-19 13:30                           ` Andreas Schwab
2006-05-19 13:48                             ` Johannes Berg
2006-05-19 14:30                               ` Andreas Schwab
2006-05-19 14:32                                 ` Johannes Berg
2006-05-18  3:13                   ` Benjamin Herrenschmidt [this message]
2006-04-16 20:43 ` PowerBook5,4 -- no sound? Benjamin Herrenschmidt
2006-04-17  0:34   ` Paul Collins
2006-04-17  0:51     ` Paul Collins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1147922022.17679.10.camel@localhost.localdomain \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=johannes@sipsolutions$(echo .)net \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox