Here is an interesting time-line paralleling black-related church history events with major events in civil rights history in the US. A lot was going on during the time of Joseph Smith that must have gotten him thinking about the issue of blacks, freedom and how they should fit into the church. Many churches split over the issue during this time.
The time line is apparently trying to be very gentle towards the church and excludes the many harsh doctrine-like statements about blacks starting with Brigham Young and continuing through to the 1970s by church leaders. It would be interesting to see if the harsh doctrinal rhetoric from church leaders began around the time J.F. Brennan published his book in 1851 (see time-line).